Use the Node EventEmitter class to publish events.