What You’ll Learn in This Hour:
• Using the Events module
• Emitting and listening for events
• How the Events module works with network programming
• Adding and removing events dynamically
As you have learned, Node.js is opinionated about the best way to approach concurrency. It suggests that using an event loop (sometimes referred to as an event queue) is an efficient way to support asynchronous code and address the issue of concurrency. For developers coming from procedural, imperative languages this can be a paradigm shift, and many developers refer to programming around events as “programming inside out.”
The Events module is central to Node.js, and many other modules use it to structure ...