A distributed WebSocket server with high level abstractions and HTTP APIs, based on socket.io and its redis adapter.
https://solver-workshop.github.io/ws-center
Change the configurations in /config
folder, and deploy this application.
Clients can use socket.io client
to communicate with the server.
const SocketClient = require('socket.io-client')
const client = SocketClient('http://localhost:9001', {
query: { userId: id },
path: '/ws'
})
client.on('message', function (body) {
// ...
})
client.on('connect', function () {
// ...
})