Minimalistic wrapper around engine.io* that you can browserify.
$ npm install simple.io
Server-side:
server = require('http').createServer().listen(3000)
onConnect = require('simple.io')(server)
onConnect(function(io){
io.sub(function(msg){
msg.from
// => 'william'
msg.text
// => 'Morning, Paul'
})
io.pub({ from: 'paul', text: 'Oh, morning, William, how are you?' })
})
Client-side:
io = require('simple.io')() // or: require('simple.io')('localhost:1234')
io.pub({ from: 'william', text: 'Morning, Paul.' })
io.sub(function(msg){
msg.from
// => 'paul'
msg.text
// => 'Oh, morning, William, how are you?'
})
$ npm install -g indev
$ indev test