Web sockets implementation for boards-sockets using socket.io.
$ npm install
$ node index.html
Open browser http://localhost:8000
This service will receive messages from boards-backend via the RedisStore used by Socket.io. We have two distinct rooms for all communication one for User events and another for Account events.
Every message should be targeted to a specific room. Rooms allow us to target only specific users. If we don't specify a room the message will arrive to all users.
User room name: 'u' + <user_id>
Account room name: 'a' + <account_id>
Every message will use the message
event type which will be listened to by the client side application. Here's an example using socket.io-announce.
announce = Announce()
announce.emit('message', {...}, room='u1')
The following is an example payload.
{
"data_type": "notification",
"method": "create",
"data": {...}
}
user
, account
, board
, stack
, card
, comment
, notification
, user_setting
, account_setting
.
create
, update
, delete
.
The data field can only contain a JSON object.