Courses / Web apps & analytics / Node.js and Express API Development

Free courseSelf-paced

Node.js and Express API Development

Build a validated REST service in Node.js and Express 5 with SQLite persistence, an authentication boundary and HTTP tests, and rehearse a local release.

  • Who it's for. JavaScript developers who use Git and want to build backend APIs.
  • Before you start. JavaScript Programming and Git, GitHub and Open Source Contribution, or equivalent small-program and Git experience. Not a first programming course; no database or auth knowledge assumed.
  • 29 to 50 hours of study with practice
  • 9 modules, 52 lessons
  • 4 guided projects and a final project

What you'll learn

  • Build an HTTP service with node:http to understand requests, statuses and headers.
  • Build an Express 5 API with routers, ordered middleware and JSON parsing.
  • Validate input and return one consistent error shape through a central error handler.
  • Persist data in SQLite through a repository layer with transactions and migrations.
  • Test the service over HTTP with node:test and rehearse a release with health checks and graceful shutdown.

Skills you'll gain

  • Node runtime
  • modules
  • Asynchronous IO
  • HTTP service basics
  • Express routing
  • middleware
  • Validation
  • errors
  • Persistence
  • Authentication boundaries
  • Testing
  • configuration
  • Service deployment lab

Tools you'll use

  • Node.js
  • Express 5
  • node:sqlite (SQLite)
  • node:test
  • npm
  • Git

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 9 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 4 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 2

    Node and async IO

    Run Node scripts with modules and handle asynchronous IO, streams and cancellation.

    You build: Command-line and file toolkit.

  2. 02

    Modules 3 to 5

    HTTP and Express

    Build a service on node:http, rebuild it in Express 5 and add validation and errors.

    You build: Notes service on node:http, then an Express 5 task API with validation.

  3. 03

    Modules 6 to 8

    Persist, protect and test

    Store data in SQLite, add an authentication boundary and test over HTTP.

    You build: Persistent, protected, tested service.

  4. 04

    Module 9

    Service deployment lab

    Add health checks, graceful shutdown and a smoke test in a local environment.

    You build: Release rehearsal with a smoke script.

Full curriculum

9 modules and 52 lessons, 29 to 50 hours of study

01Node runtime and modules5 lessons, 2 to 4 hours

Lessons

  • Running a Node script and reading process arguments
  • ES modules and CommonJS: how Node picks one
  • Built-in modules, node: specifiers and safe paths
  • npm packages, package.json scripts and the lockfile
  • Exit codes and unhandled failures

After this module you can

  • Run a script with node and read process.argv to separate the executable, the script path and user arguments.
  • Predict whether a given file runs as ES module or CommonJS from its extension and the nearest package.json type field.
  • Set process.exitCode deliberately and predict what Node does with an uncaught exception and with a rejected promise nobody handles.
02Asynchronous IO6 lessons, 3 to 4 hours

Lessons

  • Event loop ordering: sync code, microtasks and timers
  • Promises and async/await: where errors travel
  • Reading and writing JSON files with fs/promises
  • Running tasks in parallel with Promise.all and allSettled
  • Streams and pipeline for large files
  • Timeouts and cancellation with AbortSignal

After this module you can

  • Predict the print order of synchronous statements, promise callbacks, process.nextTick and setTimeout in one script.
  • Convert a callback or promise chain to async/await and route a failure to the right catch block.
  • Cancel a slow fetch with AbortSignal.timeout and tell a timeout from a network failure by error name.
03HTTP service basics5 lessons, 2 to 4 hours

Lessons

  • A request and response with node:http
  • Reading a request body and parsing JSON
  • Routing by method and path, with 404 and 405
  • Status codes and Content-Type contracts
  • Calling the service from a test with an ephemeral port

After this module you can

  • Create a server with http.createServer, write a status, header and body, and read request method and URL.
  • Collect request body chunks, parse JSON safely and respond with 400 for malformed input.
  • Start a server on port 0 inside node:test, call it with fetch and shut it down so tests do not leak handles.
04Express routing and middleware6 lessons, 3 to 4 hours

Lessons

  • Your first Express 5 app and route
  • Route parameters, query strings and typed conversion
  • Express 5 path syntax: named wildcards, optional segments and arrays
  • Middleware order and calling next
  • Parsing JSON bodies with express.json
  • Splitting routes with express.Router

After this module you can

  • Install Express 5, create an app with one GET route returning JSON and start it without hard-coding the port in the app module.
  • Read req.params and req.query values, convert them to numbers safely and answer 404 or 400 for bad ids.
  • Move related routes into a Router module, mount it under a prefix and keep a single app-level fallback for unknown paths.
05Validation and errors7 lessons, 3 to 5 hours

Lessons

  • Validating a JSON body by hand
  • Validating query parameters: coercion and bounds
  • One consistent error response shape
  • A central error handler and async failures in Express 5
  • HttpError classes and mapping to statuses
  • 404 fallbacks and malformed JSON through the handler
  • Conflicts and idempotency: 409, PUT versus PATCH

After this module you can

  • Write a validator that checks types, required fields and lengths and returns a list of field errors.
  • Parse limit and offset from query strings, apply defaults and reject out-of-range values with 400.
  • Return 409 for uniqueness conflicts and explain which of PUT, PATCH and DELETE can be repeated safely.
06Persistence7 lessons, 3 to 5 hours

Lessons

  • Opening a SQLite file and creating a strict table
  • Parameterised statements: prepare, run, get and all
  • A repository layer between routes and SQL
  • CRUD endpoints with the status contract
  • Constraints, conflicts and transactions
  • Schema versions and surviving restarts
  • Filtering, pagination and a supporting index

After this module you can

  • Open a database file with node:sqlite, create a STRICT table with exec and confirm the file exists after the process ends.
  • Insert and read rows with prepared statements, using placeholders instead of string concatenation.
  • Implement a filtered, paginated list query and add an index for the filter so the plan uses it.
07Authentication boundaries5 lessons, 2 to 4 hours

Lessons

  • Where the boundary sits: public versus protected routes
  • Bearer API keys from configuration, compared safely
  • Ownership: scoping data to the authenticated owner
  • CORS, security headers and request size limits
  • Rate limits, 429 and logs that keep secrets out

After this module you can

  • Split the route table into public and protected sets and enforce the split in middleware that returns 401 before any handler runs.
  • Read keys from environment configuration, parse the Authorization header and compare keys in constant time.
  • Add a fixed-window in-memory limiter returning 429 with Retry-After and log requests with redacted Authorization values.
08Testing and configuration6 lessons, 3 to 4 hours

Lessons

  • Structuring tests with node:test, describe and assert
  • Testing HTTP with createApp, a random port and fetch
  • Isolating state: fresh database and fixtures per test
  • Asserting the contract: status, headers and error shapes
  • Configuration from environment variables with fail-fast validation
  • Controlling time and dependencies with mocks

After this module you can

  • Write describe/it tests with node:assert/strict, run them with node --test and read the pass, fail and exit-code output.
  • Start the app on port 0 per test file, call it with fetch or a supertest-style helper and assert status, headers and body.
  • Replace the clock and an outside dependency in a test using node:test mock utilities and assert the calls made.
09Service deployment lab5 lessons, 2 to 3 hours

Lessons

  • Health and readiness endpoints and structured logs
  • Production-mode behaviour: NODE_ENV and information hiding
  • Graceful shutdown on SIGTERM
  • Reproducible install and start from a clean checkout
  • Smoke test script and release checklist

After this module you can

  • Expose liveness and readiness endpoints that report different things and write one JSON log line per request.
  • Predict and verify what changes between development and production modes, and hide internals in production responses.
  • Write a smoke script that exercises the running service through its public contract and exits non-zero on the first deviation.

What you'll build

4 guided projects along the way, then a final project.

  • Command-line and file toolkit

    after module 2
  • Notes service on node:http

    after module 3
  • Express 5 task API with validation

    after module 5
  • Persistent, protected, tested service

    after module 8

Final project

Choose one API: a task tracker, a habit log or an equipment booking service.

What you submit

Repository with code, package.json, lockfile, .env.example and README; at least 24 node:test tests; restart persistence evidence.

How it's reviewed

Proposed rubric: API contract 25%, validation and errors 20%, persistence 20%, tests 20%, configuration and setup 15%, plus a live demonstration including restart and graceful shutdown.

Where you'll use it

  • Add input validation and consistent 400 and 404 responses to an existing API route.
  • Write HTTP tests that prove one user cannot read another user's records.

Roles that use these skills

  • Backend developer
  • Node.js developer
  • API developer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

Does it cover JWT or OAuth?

No. It uses a simple API-key bearer check; sessions, JWT, OAuth and OIDC are left to later courses.

Is the service deployed to a real server?

No. The deployment lab runs in a local, disposable environment.

Is this a first programming course?

No. You need working JavaScript and Git first.

Be first in when Node.js and Express API Development opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
FreeOpens soon
Notify me