Astro β Run and Build
Overview
Section titled βOverviewβQuick start for creating, running, and building an Astro static site.
Prerequisites
Section titled βPrerequisitesβ- Node.js 18.14+ (LTS recommended)
1) Create a new site
Section titled β1) Create a new siteβnpm create astro@latest my-astro-sitecd my-astro-sitenpm install2) Run locally
Section titled β2) Run locallyβStart the dev server (default at http://localhost:4321):
npm run dev3) Build for production
Section titled β3) Build for productionβOutputs to dist/:
npm run build4) Preview the production build
Section titled β4) Preview the production buildβServe the built site locally:
npm run preview5) Deploy
Section titled β5) DeployβUpload the contents of dist/ to your static host. Many providers have first-class Astro adapters or support static hosting out of the box.