When I first heard about Node.js, I thought it was just a JavaScript implementation for the server. But it’s actually much more: it comes with a host of built-in functions that you don’t get in the browser. One of those bit of functionality is the Event Module, which has the EventEmitter class. We’ll be looking at that in this tutorial.EventEmitter: What and WhyOne last benefits to events: they are a very loose way of coupling parts of your code together.So, what exactly does the EventEmitter class do?...
↧