-
Install dependencies with
yarn
(ornpm
) -
Run the service with
node app/index.js
-
Connect from socket and join the rooms you want to listen to and add event hooks:
var mySocket = io();
mySocket.emit('join', 'my-room');
mySocket.on('echo', function(e) { console.log('my-room echo', e); });
POST
events to/events/<room>/<event>
, the event will be forwarded to the connected sockets.
- There's a log available in
/log
- There are stats with the timestamp for the last message for each room in
/stats
A docker image is available:
- Run
docker run -d -p 5005:5005 zoomeranalytics/socket.io-gateway:1.0.1 node index.js