0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/docs/quick-start.md
Fred K. Schott d40edb0b67
Docs sync (#680)
* test ignoring examples from workspace

* docs sync
2021-07-14 13:41:51 -04:00

1.4 KiB

layout title
~/layouts/Main.astro Quick Start
# prerequisite: check that Node.js is 12.20.0+, 14.13.1+, or 16+
node --version

# create a new project directory, and `cd` into it
mkdir mkdirtest && cd "$_"

# prepare for liftoff...
npm init astro

# install dependencies
npm install

# start developing!
npm run start

# when you're ready: build your static site to `dist/`
npm run build

To deploy your Astro site to production, upload the contents of the /dist folder (generated by running npm run build) to your favorite hosting provider.

Read more about deploying Astro in the Deploy guide

Start your project

Go back to your command-line terminal, and run the following command in your project directory:

npm start

Your application is now running on http://localhost:3000. Open this URL in your browser and you should see the text "Hello, World" that we copied in the previous step.

Astro will listen for file changes in your src/ directory, so you do not need to restart the application as you make changes during development.

Build your project

Go back to your command-line terminal, and run the following command in your project directory:

npm run build

This will build your site and write it to disk in the dist/ directory. Astro sites are static, so they can be deployed to your favorite host (Vercel, Netlify, an S3 bucket, etc.).