Phase 2 · Node.js Fundamentals

Topics

Event Emitter

Part of the Backend Developer Roadmap.

Summary

Node's built-in pattern for building objects that emit named events other code can listen for — the mechanism underlying HTTP servers, streams, and much of Node's core API.

How to Learn This

  • 1Build a simple custom class extending `EventEmitter` that emits a custom event.
  • 2Learn `.on()`, `.once()` and `.emit()`.
  • 3Recognize that Node's `http.Server` and streams are themselves EventEmitters.
InsideEdge

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.

Download
InsideEdge