2 tutorials
Node.js tutorials
Every Node.js guide on the site, newest first. Each one is built around code you can run.
The Node.js material covers building services: Express routing and middleware, connecting to MongoDB, structuring an API that grows past a single file, and handling errors in asynchronous code without losing the stack trace.
Asynchrony gets attention up front, because most Node problems are really problems with the event loop, promise handling, or an unhandled rejection somewhere in a chain. The guides use async/await throughout and are explicit about where an await belongs.
Examples are complete applications rather than route snippets, since the parts that are hard to get right — error handling, configuration, connection lifecycle — only appear once there is a whole application to place them in.
Project structure gets covered because Express imposes none. A single file is fine until it is not, and the point at which routing, business logic and data access need separating arrives sooner than most tutorials suggest. The guides show a layout that survives growth without being elaborate on day one.
Configuration and lifecycle round it out: reading settings from the environment rather than a committed file, opening a database connection once rather than per request, and shutting down cleanly so in-flight requests finish instead of being severed.
The guides use CommonJS or ES modules consistently within an article and say which. Mixing the two in one project is legal, awkward, and the source of a specific class of import error that is much easier to avoid than to debug.
Asynchronous is not the same as parallel. A single Node process runs JavaScript on one thread, and an await only yields while something else is waiting on input or output. Work that is genuinely CPU-bound, such as parsing a large payload, hashing, or image manipulation, holds that thread and stalls every other request in flight, which is why a service can look healthy under light load and collapse under real traffic. The answer is to move that work off the loop, through worker threads or a separate process, and the guides say which of the two fits a given case rather than assuming the loop will absorb it.
The material assumes you are building a service rather than learning JavaScript. That means the emphasis falls on the parts that decide whether the thing survives contact with production: how the request pipeline is assembled, where validation belongs, what an unhandled rejection does to the process, and how configuration and secrets reach the application without being baked into an image.
Package management gets more attention than it usually does, because it is the most common source of a build that worked yesterday. The difference between npm install and npm ci, what a caret actually permits, and why the lockfile is the real dependency list are covered on their own terms rather than as an aside.
Error handling runs through everything. Node gives you three separate mechanisms that all look similar and behave differently: a synchronous throw, a rejected promise, and an error event on an emitter. Only the first is caught by a try block, only the second is caught by an async error handler, and the third will terminate the process if nothing is listening. The guides say which one applies rather than assuming a single pattern covers the request path.
Where a framework choice matters it is stated, and where it does not, the plain platform version is shown first.
All Node.js tutorials
Frequently asked questions
Which Node version do the examples target?
A current LTS release. Anything depending on a specific version is called out.
Callbacks, promises or async/await?
async/await throughout. Callback style appears only where an older API forces it.
Is MongoDB required?
For the database guides, yes. The Express and routing material is independent of the storage layer.
How is error handling covered?
With centralised Express error middleware and explicit handling of rejected promises, which is where unhandled rejections usually originate.
How should an Express project be structured?
Routes, business logic and data access separated once the app outgrows one file. The guides show the layout rather than prescribing a framework on top of the framework.
Why does my process exit before the database connects?
The connection is asynchronous and nothing awaited it. Connection lifecycle is covered explicitly for that reason.
Do I need TypeScript to follow the Node guides?
No. The examples are plain JavaScript and run on any current LTS release. Where a type annotation would make an API contract clearer the guide describes the shape in prose instead, so nothing depends on a build step you have not set up.