$ npm create astro@latest -- --template starlightNeed to install the following packages:create-astro@4.7.4Ok to proceed? (y) astro Launch sequence initiated. dir Where should we create your new project? ./site ◼ tmpl Using starlight as project template ts Do you plan to write TypeScript? No ◼ No worries! TypeScript is supported in Astro by default, but you are free to continue writing JavaScript instead. deps Install dependencies? (recommended) ● Yes ○ No git Initialize a new git repository? ● Yes ○ No ██████ Project initializing... ▶ Template copying... □ Dependencies □ Git next Liftoff confirmed. Explore your project! Enter your project directory using cd ./site Run npm run dev to start the dev server. CTRL+C to stop. Add frameworks like react or tailwind using astro add. Stuck? Join us at https://astro.build/chat ╭─────╮ Houston:│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀╰─────╯
启动服务
$ npm run dev > site@0.0.1 dev> astro dev 17:04:32 [vite] Port 4321 is in use, trying another one... astro v4.5.4 ready in 1183 ms ┃ Local http://localhost:4322/┃ Network use --host to expose 17:04:32 watching for file changes...17:04:40 [200] / 384ms
$ npm i -S @vercel/analytics