Prerequisites
Before you begin, ensure you have the following installed:- Node.js: Version 20 or higher (as specified in netlify.toml:34)
- npm, yarn, or pnpm: Package manager of your choice
- Git: For version control
The project uses Node.js 20 in production. We recommend matching this version locally to avoid compatibility issues.
Installation
Create a
.env file in the root directory and configure your environment variables. See the Environment Variables page for details.Available Scripts
The following npm scripts are available in package.json:5-12:| Script | Command | Description |
|---|---|---|
dev | astro dev | Start the development server with hot reload |
start | node ./dist/server/entry.mjs | Start the production server |
build | astro build | Build the site for production |
preview | astro preview | Preview the production build locally |
generate-sitemap | node scripts/generate-sitemap.js | Generate the sitemap.xml file |
Building for Production
dist/ directoryProject Structure
Understanding the project structure will help you navigate the codebase:Next Steps
Environment Variables
Configure required environment variables for your setup
Configuration
Learn about Astro and Tailwind configuration options
Deploy to Netlify
Deploy your site to Netlify in minutes
Custom Domain
Set up a custom domain for your deployment
Troubleshooting
Port already in use
If port 4321 is already in use, you can specify a different port:Build errors
If you encounter build errors, try:- Delete
node_modules/andpackage-lock.json - Clear Astro cache:
rm -rf .astro - Reinstall dependencies:
npm install - Rebuild:
npm run build