Programming is my life~!
Thursday, August 28, 2014
event emiter in nodejs
var custom = new process.EventEmitter();
custom.on('hello', function(){ console.log('event generated')});
custom.emit('hello');
======================
"event generated" log will be written in console
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment