Skip to content

Instantly share code, notes, and snippets.

@gquental
Created August 30, 2012 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gquental/3521678 to your computer and use it in GitHub Desktop.
Save gquental/3521678 to your computer and use it in GitHub Desktop.
CW35 Hack Thursday - NodeJS - Events
var EventEmitter = require('events').EventEmitter;
var Event = new EventEmitter();
Event.on('message', function (data) {
console.log(data);
});
Event.emit('message', 'Hello World');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment