Skip to content

Colu-platform/gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gateway

entry point to the colu enviorment, it's also a job queue consumer and holds the socket connections for socket.io on all the clients.

Under development

TODO:

  • Add IOS/Android push
  • Route all traffic through gateway and proxy to servers

Installation

npm install gateway

reading messages published to pubsub

User connected message

var pubsub = require('fw_pubsub')
var prod = new pubsub.Producer('http://localhost')
prod.create()
prod.on('message', function(name, data, remoteId){
  if(name === 'userConnected') {
    console.log('registering userid ', data.userId)
  }
})

Without cluster:

messages gateway accepts

from inside the callback when a new user message is recived:

 prod.publish('addToRooms', ['room1', 'room2'], remoteId)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published