process.nextTick as equivalent to a Promise microtask — it always drains first, and an unbounded chain of nextTick calls starves the event loop even more thoroughly than an unbounded microtask chain does.await or a .catch() and assuming its eventual rejection will surface somewhere useful on its own..js file's module system (CommonJS vs. ESM) is decided by the nearest package.json's "type" field, not by anything in the file itself.fs.readFile when a stream would serve it incrementally with roughly constant memory use..env files load automatically — Node doesn't read them without dotenv (or an explicit --env-file flag), and the loading call has to run before anything that reads the resulting process.env values.node server.js and no process manager, so a single uncaught exception takes the whole service down with no automatic restart.SIGTERM, so every deploy or scale-down drops whatever requests happen to be in flight at that exact moment.Node's event-loop model is the same fundamental idea as the browser event loop covered in the JavaScript reference, extended with real OS-level I/O and a phase-based macrotask layer instead of a single generic task queue — and Express's middleware pipeline is the same onion-shaped pattern covered across three other frameworks in Middleware Pipelines Compared. Try the event-loop ordering examples and the streaming server above as runnable code in the code lab.
Continue learning
Testing Fundamentals: Unit, Integration, and E2E Tests Done Right
System DesignSystem Design Fundamentals for Interviews: Scalability, Trade-offs, and the Framework Interviewers Actually Grade
Next.jsNext.js Fundamentals: The App Router, Server Components, and the Caching Layer Nobody Warns You About