bentojs-socket
Stand alone socket.io server designed to deliver communication from multiple services using redis
Last updated a year ago by kodemon .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install bentojs-socket 
SYNC missed versions from official npm registry.

npm version npm GitHub license

Socket

Setup

Start by cloning this repo to the location you want to run your socket server, once this is done go into the folder and run the following:

# Install socket core
$ npm install

To run the socket server run the following command:

# Start the socket server
$ REDIS=localhost:6379 API=localhost:8370 DEBUG=socket:* node run.js

Docker

To run the socket server in a docker container, open up your docker terminal and run the following commands:

$ docker pull bentojs/socket
$ docker run --name socket -e REDIS=localhost:6379 -e API=localhost:8370 -p 5000:5000 bentojs/socket

The following setting variables are available:

  • PORT What port to listen under.
  • REDIS The path to the redis server handling socket events.
  • API The path to the API where we register and authenticate socket_id for new connections.
  • ORIGINS A comma seperated origin list that is allowed access to the socket server.
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |