Sign inSign up

isacaraujo/websocket-apigateway

By isacaraujo

•Updated almost 6 years ago

Emulate the aws apigateway websocket behavior

Image
0

271

isacaraujo/websocket-apigateway repository overview

⁠Get Started

With docker, launch:

$ docker run --rm -it \
  -e 'CONNECT_URL=http://localhost:3333/ws/events/connected' \
  -e 'DISCONNECT_URL=http://localhost:3333/ws/events/disconnected' \
  -e 'MESSAGE_URL=http://localhost:3333/ws/events/messages' \
  -e 'STAGE_PATH=/ws' \
  -e 'HTTP_PORT=6262' \
  -p 6262:6262 \
  isacaraujo/websocket-apigateway

⁠Examples

To make the examples run, please use the following commands:

CONNECT_URL='http://localhost:3333/connected' DISCONNECT_URL='http://localhost:3333/disconnected' MESSAGE_URL='http://localhost:3333/messages' STAGE_PATH='/ws' HTTP_PORT=6262 node dist/index.js
docker run --rm  -d --name sample -v $$(pwd)/examples/:/usr/share/nginx/html:ro -p 8080:80/tcp nginx
node examples/backend.js

Tag summary

Content type

Image

Digest

Size

73.1 MB

Last updated

almost 6 years ago

docker pull isacaraujo/websocket-apigateway