Skip to content
/ vite-aws Public template

Template for a web server application deployed with a cost-effective scalable AWS architecture

Notifications You must be signed in to change notification settings

bebeal/vite-aws

Repository files navigation

vite-aws

Template for a web server application deployed with a cost-effective scalable AWS architecture:

  • Static content served via CloudFront distribution from S3
  • Serverless API endpoints using Lambda functions with Express routes for on-demand compute
  • Infrastructure as Code using AWS CDK for manageable deployments
  • Near-zero cost when idle, with pay-per-use pricing for both static hosting and API compute
  • (Branch available with built in MDX rendering: - https://vite-aws.com/posts)

Features

Other Libraries

Environment Setup

After cloning, copy .env.example to .env and add your AWS credentials.

Note: Env variables are injected into the lambda function as environment variables. (except for reserved AWS variables)

Development

Using yarn

corepack enable         // enable corepack
yarn set version berry  // set yarn to latest version
yarn                    // install dependencies
Screenshot 2025-04-05 at 6 10 03 PM
yarn dev          // run the development server
Screenshot 2025-04-05 at 6 18 51 PM
yarn build        // build both client side and server side build
Screenshot 2025-04-05 at 6 17 23 PM

Additional Commands

yarn clean        // clean everything thats generated in the build/dev process
yarn build:client // build the client side to dist/client
yarn build:server // build the server side to dist/server
yarn lint         // run eslint
yarn format       // run prettier
yarn test         // run tests

CDK

yarn build:cdk    // build the cdk
yarn deploy       // deploy the cdk
Screenshot 2025-04-05 at 6 27 30 PM

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •