

Lesson 05 · 10 min
Events and process errors
EventEmitter: someone shouts, someone listens. And what to do when it all falls over.
10 minLesson 5 of 10Practice includedAsk AI on any point
A lot of Node is built on events: the server "got a request", a stream "got data", the process "got a signal". EventEmitter has two main methods: on(name, fn) subscribes, emit(name, data) calls every subscriber in turn.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.