How to build a chat using Lambda + WebSocket + API Gateway? (nodejs)



How to build a chat using Lambda + WebSocket + API Gateway? (nodejs)

How to build a chat using Lambda + WebSocket + API Gateway? (nodejs)

⚡️ Blog post and source code: https://www.undefinedapps.com/post/lambda-websocket-api-gateway-chat

In this video we build a real-time chat app (like slack) that uses websockets backed by an AWS lambda function and Amazon API Gateway. The app sends JSON over the websocket to deliver the chat messages and notifications in real time, over a two-way communication line, to all the users of the chat.

0:00 Demo and Description
0:34 Setting Up API Gateway
2:22 Creating the Lambda Function
4:12 Writing the Backend Code (javascript/nodejs)
9:15 Testing the WebSocket Using wscat
14:44 The Chat Client UI Overview (react+hooks)
17:47 Writing the Frontend Code (javascript/typescript)
23:54 Trying What We Built by Connecting to the Chat as 4 Different Users

The client is written in react (with hooks) and uses the WebSocket api that is available in all the modern browsers. The backend is serverless and uses API Gateway + AWS Lambda with javascript/nodejs.

⭐️ Subscribe for more content: https://newsletter.undefinedapps.com/

#WebSocket #Lambda #ApiGateway #javascript #nodejs

Comments are closed.