Node applications use a built-in class called an EventEmitter. You import this class by requiring the 'events' module in your app.
EventEmitter
'events'
Using this class, we can create (or emit) an event into the current event pool.
Any other app requiring the same event pool will have the ability to hear or listen to this event with the .on method attached to the EventEmitter.
.on
Just like we can listen with .on, we can stop listening with the .removeListener method at any point.
.removeListener
There was an error while loading. Please reload this page.