All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run format |
Format codes with Prettier |
npm run lint:eslint |
Run Eslint |
npm run astro ... |
Run CLI commands like astro add, astro preview |
Steps to run the website locally:
- Download the website folder which contains everything
- Open VSCode or similar software or download VSCode
- Open the folder within VSCode(will give you the option to select a folder upon startup)
- In the folder, look to open up a new terminal, also make sure to have everything downloaded especially an up-to-date version of NodeJS.
- In the terminal make sure to install all the dependencies by running npm install into the terminal
- After having everything downloaded onto your local environment then you can now type npm start into the terminal
- You should get a localhost URL within your terminal now and basically, all you have to do is copy and paste the URL within a browser.
- You should now be able to see the development build of the website with updates occurring automatically if you change anything.