node-eventer
v0.3.2
Published
Pub/Sub Events Library
Downloads
13
Readme
node-eventer
A node.js module for Easy Pub/Sub events:
$ npm install node-eventer
Then import it into your project:
//Initilze The Node Eventer
var nodeEventer = require('node-eventer').init();
//Subscribe from any piece of your code
nodeEventer.subscribe('helloworld', function(data){
console.log('received Data ==>', data);
});
//Then Publish a message to the Event key 'Helloworld'
nodeEventer.publish('helloworld', {"message": " This is the JSON Message"});