A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 50 companion flashcards using spaced repetition.
Node.js is a JavaScript runtime built on Chrome's V8 engine that executes JavaScript outside the browser. Its defining characteristic is an event-driven, non-blocking I/O model, wh...
Node.js supports two module systems for organizing code. CommonJS is the original, using the require function to load modules synchronously and module.exports (or the shorter expor...
Streams are one of Node.js's most powerful abstractions for handling data. Rather than loading entire files or network payloads into memory, streams process data in chunks as it fl...
Asynchronous programming is at the heart of Node.js, and Promises are its primary abstraction. A Promise represents the eventual completion or failure of an asynchronous operation...
Express.js is the most widely used web framework on top of Node.js, and its core concept is middleware. A middleware function receives the request object (req), the response object...
Node.js ships with a rich set of built-in modules that cover most server-side needs without external dependencies. The fs module handles file system operations: fs.readFile and fs....
npm, the Node Package Manager, is the default way to share and consume JavaScript libraries. It provides both a command-line tool and a vast public registry hosting millions of pac...
Robust Node.js applications need a clear strategy for handling errors, which can occur at multiple levels. Synchronous errors and those thrown inside async functions can be caught...