Chat app example using Angular and AWS serverless infrastructure.
- Install serverless framework -
npm install serverless -g
or click here for detailed steps - Clone the Project -
https://github.com/bytebruno/chat-app-angular-serverless.git
- Access the backend folder -
cd backend
- Install the dependencies -
npm install
- Install local dynamodb environment -
sls dynamodb install
- Start local serverless environment -
npm run offline
orsls offline start
- The serverless environment will be running at:
- ApiGateway RestApi:
http://localhost:15001
- ApiGateway Websocket:
ws://localhost:3001
- DynamoDB:
http://localhost:15002
andhttp://localhost:15002/shell (visual client)
- S3 bucket:
http://localhost:4569
- ApiGateway RestApi:
- Change the bucket name on
serverless.ts
at line 62 otherwise the deploy will fail due to S3's name duplication. - Deploy to AWS-
npm run deploy
orsls deploy
- Access the client folder -
cd client
- Install the dependencies -
npm install
- Change apiUrl and websocketUrl environment variables at
src/environments/environment.ts
to match your local or deployed serverless api urls. - Start local angular app -
npm start
- Your local client will be running at
http://localhost:4200
- Extra: You can test with more users loging in different browsers.
See here README-TEST-POSTMAN
- AWS Serverless Infrasctructure
- Serverless Framework
- Angular 12
- PrimeNg
- Add more logs;
- Show an event on chat when users connects or disconnects;
- Handle websocket disconnection;
- Unit tests;
- Implement some state management on client, possibly NGRX;