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)
- Node
- Yarn
- Vite
- React
- TypeScript
- Express
- TanStack Router
- TanStack Query
- Tailwind
- Eslint
- Prettier
- AWS S3
- AWS CloudFront
- AWS Lambda
- AWS CDK
- AWS Bedrock
After cloning, copy .env.example
to .env
and add your AWS credentials.
Using yarn
corepack enable // enable corepack
yarn set version berry // set yarn to latest version
yarn // install dependencies
yarn dev // run the development server
yarn build // build both client side and server side build
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
yarn build:cdk // build the cdk
yarn deploy // deploy the cdk