Skip to content
Demo project: A simple chat using websockets, serverless and aws lambda
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
handler.js
helper.js
package-lock.json
package.json
serverless.yml

README.md

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!"}

You can’t perform that action at this time.