Skip to content

Repository files navigation

Cadwell Windows

Static site for cadwellwindows.com, built with Vite + React + React Router and deployed to AWS S3.

Development

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 mode

Production build

npm run build      # Compile to dist/
npm run preview    # Preview the built site at http://localhost:4173

Deployment (AWS S3 + CloudFront)

One-time setup:

  1. Create an S3 bucket and enable Static website hosting
    • Index document: index.html
    • Error document: index.html ← required for React Router to work
  2. Set a public-read bucket policy
  3. Put a CloudFront distribution in front of the bucket
  4. Install the AWS CLI and run aws configure with credentials that can write to the bucket and create CloudFront invalidations
  5. Copy deploy.config.example to deploy.config.local and 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 cache

Images

Photos live in public/images/ and are copied into dist/images/ at build time.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages