Skip to main content
WebsiteintermediateFree

Node.js Best Practices

by Yoni Goldberg · GitHub

Answers the question the official docs deliberately do not: how to structure, operate and secure a real Node service. Over 100 curated Node.js practices covering project architecture, error handling, testing, production operations, security and Docker. Each item states the rule, explains the reasoning, and links code examples and citations. Updated periodically with community review.

Visit resource

More resources on Node.js

YouTubeFree

Everything You Need to Know About the Node.js Event Loop

Keynote by the author of libuv, the C library underneath Node.js, walking through each event loop phase, timers, poll and check ordering, and the thread pool. Explains why observed callback ordering sometimes surprises.

WebsiteFree

Express Web Framework (Node.js/JavaScript) - MDN

MDN's seven-part Express tutorial builds a Local Library site: environment setup, project skeleton, Mongoose models, routes and controllers, template rendering, form handling with validation, and production deployment. Self-contained, with no framework prerequisites beyond JavaScript.

YouTubeFree

Do Not Thrash the Node.js Event Loop (SREcon23 EMEA)

Fills the gap the docs and courses leave: what the event loop actually does to you under production load, measured rather than hand-waved. Conference talk by a Node.js Technical Steering Committee member on why production Node.js services saturate. Measures event loop utilisation, shows how unbounded concurrency causes latency collapse and self-inflicted denial of service, and demonstrates applying backpressure to fix it.

BookPaid

Node.js Design Patterns, Fourth Edition

The only book-length treatment that explains why Node's abstractions are shaped the way they are — streams, async control flow, module systems — instead of listing APIs. Works through Node.js internals, the module systems, callback and promise patterns, streams, structural and behavioural design patterns, then scaling with clustering, microservices and messaging. Adds ESM improvements, TypeScript guidance and a new testing chapter.

CourseFree

Full Stack Open — Part 3: Programming a Server with Node.js and Express

This is the free, graded, project-based counterpart to the docs: it forces you to actually ship an Express API with a database and a deploy, with exercises that are checked. University of Helsinki course section that builds a REST API with Node.js and Express, connects it to MongoDB with Mongoose, and deploys it. Includes validation, error handling, linting and exercises graded against the course's own submission system.

WebsiteFree

Node.js Learn — Official Guides

The official Node.js learning guides, maintained by the project itself. Covers the module system, the event loop and asynchronous work, HTTP servers, file handling, streams and backpressure, the built-in test runner, diagnostics, flame graphs and TypeScript.

See all Node.js resources →