yehonadav / serverless-websocket-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Websockets Authorizers Example

  • Deploy the example service: sls deploy
  • connect to the outputted wss url using wscat: npm install -g wscat
wscat -c wss://xxxxxxx.execute-api.us-east-1.amazonaws.com/dev
  • Connection should fail.
  • Try again, this time specify an Auth header:
wscat -c <wss-url> -H Auth:secret
  • Connection succeeds.
  • Enjoy chatting with yourself :)

About


Languages

Language:JavaScript 100.0%