Static site for cadwellwindows.com, built with Vite + React + React Router and deployed to AWS S3.
npm install # Install dependencies
npm run dev # Start dev server at http://localhost:5173 (hot reload)
npm test # Run tests once
npm run test:watch # Run tests in watch modenpm run build # Compile to dist/
npm run preview # Preview the built site at http://localhost:4173One-time setup:
- Create an S3 bucket and enable Static website hosting
- Index document:
index.html - Error document:
index.html← required for React Router to work
- Index document:
- Set a public-read bucket policy
- Put a CloudFront distribution in front of the bucket
- Install the AWS CLI and run
aws configurewith credentials that can write to the bucket and create CloudFront invalidations - Copy
deploy.config.exampletodeploy.config.localand fill in your bucket name and CloudFront distribution ID (this file is gitignored and never committed)
To deploy:
npm run deploy # builds, uploads dist/ to S3, and invalidates the CloudFront cachePhotos live in public/images/ and are copied into dist/images/ at build time.