π’
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).