1.0.7 • Published 8 years ago
bentojs-socket v1.0.7
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.