Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

karloscodes/serverless-websockets-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-websockets-demo

A simple chat using websockets, serverless and aws lambda

Getting started:

  • Install serverless framework 1.38 or superior
  • run sls deploy
  • Use a websocket client such as wscat to connect and send messages

Connection and protocol details:

  • First user setup:

wscat -c wss://<my-api-id>.execute-api.us-east-1.amazonaws.com/dev?userId=1

  • Second user setup:

wscat -c wss://<my-api-id>.execute-api.us-east-1.amazonaws.com/dev?userId=2

  • Send messages:

{"action":"sendMessage","userId": "2","body":"hello!"}

Releases

No releases published

Packages

No packages published