Event-Driven Programming and Built-In Modules
By the end of this chapter, you will be able to:
- Use event modules in Node.js
- Create an event emitter to enhance the functionality of existing code
- Build custom event emitters
- Use built-in modules and utilities
- Implement a timer module to get an API to schedule timer functions
In this chapter, we will use event emitters and built-in modules to avoid creating projects with deeply coupled dependencies.
In the previous chapter, we talked about how event-driven programming is used in Node.js and how we can modify normal callback-based async operations to use async-await and promises. We know that the Node.js core API is built on async-driven architecture. ...