Skip to main content
🟒

Node.js

JavaScript on the server. Non-blocking I/O, the event loop, and streams are the foundations to understand deeply.

Topics

Event Loop

Phases of the Node.js event loop, libuv, timers, and I/O.

Streams

Readable, Writable, Duplex, Transform streams, and backpressure.

Modules

CommonJS vs ESM, module resolution, circular dependencies.

Express

Middleware, routing, error handling, and request lifecycle.
β—† Core Model
Node.js is single-threaded for JavaScript execution but uses libuv’s thread pool for I/O operations (file system, DNS, crypto). This is why it’s non-blocking without needing multiple threads.
πŸ’‘ Interview Tip
The Node.js event loop has more phases than the browser event loop (timers β†’ I/O β†’ poll β†’ check β†’ close). Know the difference, especially setImmediate vs setTimeout(fn, 0).