GithubHelp home page GithubHelp logo

boards-sockets's Introduction

boards-sockets

Web sockets implementation for boards-sockets using socket.io.

Running

$ npm install
$ node index.html

Open browser http://localhost:8000

Backend Messages

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.

Room Names

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>

Browser event

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')

Payload

The following is an example payload.

{
	"data_type": "notification",
	"method": "create",
	"data": {...}
}
data_type:

user, account, board, stack, card, comment, notification, user_setting, account_setting.

method:

create, update, delete.

data:

The data field can only contain a JSON object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.