Angular 12.x Serverless Starter
June 27, 2021 ยท View on GitHub
This starter is intended for those who wish to run their application on AWS lambda with serverless framework.
It is super easy and done with 100% adherance to all the recommendations by Angular and Serverless community.
How to use?
Project naming
Starter comes up with it's own name, "ngx-serverless-starter". I'm sure this will not be the name for all of your project and you intend to change it with your project name. Follow this guide.
- You need to clone this repository.
- Find & replace the word "ngx-serverless-starter" with your project name.
- Update your root folder name.
Running application
Application has three major build types:
- Non SSR
- SSR
- Serverless
Non SSR
It is regular build without Angular Universal in picture.Use it for your day to day development since it is fairly fast as compared to SSR or serverless.
Command:
ng serve- For local development buildng build- For production build
SSR
This is Angular Universal build without Serverless framework.
Command:
npm run dev:ssr- For local development buildnpm run build:ssr- For production build
Serverless
This is Angular Universal build with Serverless framework.
Command:
aws configure- Configuring your AWS access keysnpm run dev:sls- For local development buildnpm run build:sls- For production buildnpm run deploy- For deploying on serverlessnpm run terminate- For terminating infrastructure resources on AWS.
For more information about this starter, head on to the article: https://medium.com/cactus-techblog/deploy-angular-universal-on-aws-lambda-from-scratch-1b169289eac2