Skip to Main Content
Node.js for Beginners
book

Node.js for Beginners

by Ulises Gascón
May 2024
Beginner to intermediate content levelBeginner to intermediate
382 pages
7h 59m
English
Packt Publishing
Content preview from Node.js for Beginners

7

Event-Driven Architecture

Events are one of the most powerful ways to use Node.js. Node.js was designed from the ground up to build event-driven modules. Many core libraries offer an events interface that can be used and extended easily. Also, Node.js provides a powerful events library that can be used to build event-driven modules.

In this chapter, we delve into events in Node.js. We will learn how to use events from the core libraries, from event listener registration to event emission, and handling multiple listeners for the same event.

We will build our first HTTP server using events, and we will discuss the organization of event listeners and the cleanup.

To sum up, here are the main topics that we will explore in this chapter:

  • Introducing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Node.js: Novice to Ninja

Node.js: Novice to Ninja

Craig Buckler
Node.js - The Complete Guide

Node.js - The Complete Guide

Academind by Maximilian Schwarzmüller GmbH
JavaScript from Beginner to Professional

JavaScript from Beginner to Professional

Rob Percival, Laurence Svekis, Maaike van Putten, Codestars By Rob Percival

Publisher Resources

ISBN: 9781803245171Supplemental Content