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.