Node.js & Express

Node.js and Express Backend Development

Build and operate a real backend REST API: the Node runtime model, Express routing and middleware, validation, structured error handling, security fundamentals, and automated testing.

intermediate14 lessons6 modules8h total

Helpful before you begin (optional -- you can start this course now): React Application Development

Who it's for

Developers comfortable with JavaScript (and ideally React) who want to build and operate a real backend API, not just consume one, and understand what actually happens between a request arriving and a response leaving.

What you'll be able to do

  • Explain Node's event-loop model and convert between callback, Promise, and async/await styles safely
  • Structure a real Express application with modular routing and a correct middleware pipeline
  • Validate untrusted input and implement centralized, structured error handling
  • Design REST resources and status codes, and manage configuration and logging safely
  • Implement correct authorization boundaries without building an unsafe auth system from scratch
  • Separate business logic into testable services and add a real automated test suite

Not started — 14 lessons, no account required.

Start this course

Practice this course →Add to a study plan →Interview questions

Node.js runtime foundations

The event loop, module systems, and the three faces of asynchronous JavaScript in Node.

  1. The Node.js Runtime Model: Event Loop and Non-Blocking I/O

    Why Node can handle thousands of concurrent connections on one thread — and the one mistake (blocking that thread) that defeats the entire model.

    19 min
  2. CommonJS vs ES Modules, npm, and Dependency Management

    Node's two module systems, why they don't mix carelessly, and what npm actually manages beyond just downloading packages.

    17 min
  3. Asynchronous Programming: Callbacks, Promises, and Async/Await

    Three syntaxes for the same underlying idea — and the one mistake (an unawaited or unhandled promise) that silently swallows errors in a real server.

    20 min

Building an Express app

Route matching, the middleware pipeline, and the three sources of request data.

  1. Express Application Structure and Routing

    How Express matches an incoming request to the right handler, and setting up a real, modularly-routed Express server on your own machine.

    28 min
  2. Middleware: The Request Pipeline

    Every Express request flows through a pipeline of functions, each deciding whether to pass control forward. Understanding next() is the entire mental model.

    19 min
  3. Request Parameters, Query Strings, and Bodies

    Three different places data arrives from in a request, each meaning something different — mixing them up is a common source of confusing bugs.

    18 min

Designing a real API

Validating untrusted input and designing REST resources and status codes deliberately.

  1. Input Validation and Rejecting Bad Requests

    Never trust a request body. Add real validation and a centralized error-handling middleware to your local Express API, so bad input is rejected consistently and safely everywhere.

    30 min
  2. REST Resource Design and HTTP Status Behavior

    Designing an API's resources and status codes from the implementer's side — the same conventions this curriculum's testing courses teach testers to verify.

    19 min

Errors, logging, and configuration

Structured errors, safe logging, and failing fast on broken configuration at startup.

  1. Structured Errors: Operational vs. Programmer Errors

    Not every thrown error deserves the same response. Distinguishing an expected, handleable failure from a genuine bug changes what's safe to tell the client.

    20 min
  2. Environment Configuration and Safe Logging

    Configuration belongs outside your code, not hardcoded inside it — and logs are a real, common place secrets accidentally leak.

    18 min
  3. Configuration Validation and Startup Failures

    A server that starts successfully with broken configuration is worse than one that refuses to start at all — failing fast, loudly, at startup is a deliberate design choice.

    18 min

Security and testing

Correct authorization boundaries and a real, isolated automated test suite.

  1. Security Fundamentals and Authentication Boundaries

    Baseline server-side security every API needs, and where authentication responsibility genuinely ends — without building an unsafe, from-scratch auth system.

    22 min
  2. Automated Testing for Routes and Services

    Test the pieces of a real Express API the way this curriculum's testing courses teach — separating logic from routing so most of it never needs a running server at all.

    30 min

Operational readiness

Graceful shutdown and health checks — what it takes to run a service, not just write one.

  1. Graceful Shutdown and Operational Readiness

    What actually happens when a real server needs to stop — and why an abrupt, ungraceful shutdown can silently drop in-flight work that a slightly more careful one wouldn't.

    20 min

Where to go next

Optional -- these build well on what you just learned, but any course can come next.