Description
Redis is awesome. But have you seen how one accomplishes pub/sub with the (otherwise incredibly awesome) redis module? Good ol' fashion event emitting/listening but using redis instead of node's native event emitter.
Get Deps
Redis needs to be running somewhere. Tests need mocha installed.
Install
npm install remitter --save
Usage
var Remitter = require( 'remitter' );
var thing = new Remitter({
host: '127.0.0.1',
port: 6379,
password: 'fflks48ow'
});
thing.connect( onReady );
function onReady() {
thing.on('anEvent', function(someData){
});
thing.emit( 'anEvent', { aMessage: 'sup' } );
}
Test
npm test