Skip to content
aviral gupta

// LEARN · LANGUAGES & FRAMEWORKS

Node.js

A practical Node.js course from a first script and project setup to HTTP APIs, streams, testing, performance and security. Every example is run on the current LTS release.

Level: Beginner to advanced · For: Developers who know basic JavaScript and want to build command-line tools and services on Node.js.

Syllabus

Beginner

Complete

After this level you can

  • Start a Node.js project that runs in the intended module system, with scripts in package.json and configuration from --env-file
  • Write a command-line tool that parses arguments with util.parseArgs, reads and writes files with node:fs/promises, and exits with a meaningful code
  • Combine callbacks, promises and async/await correctly, including running tasks in parallel and handling rejections
  • Write and run unit tests with the built-in node:test runner and node:assert
  1. B1Running Node and project basics5 of 5 written · 5 lessonsRuns on your computer
  2. B2npm and packages5 of 5 written · 5 lessonsRuns on your computer
  3. B3Files and paths5 of 5 written · 5 lessonsRuns on your computer

    Read, write and organise files safely

    You build: A notes CLI that stores JSON on disk

    1. B3.1Paths and file URLs
    2. B3.2Reading files with fs/promises
    3. B3.3Writing, appending and atomic replace
    4. B3.4Folders and stat
    5. B3.5Build: a notes CLI that stores JSON on disk
  4. B4Asynchronous Node5 of 5 written · 5 lessonsRuns on your computer

    Combine async operations correctly, in sequence and in parallel

    You build: A parallel folder-size report

    1. B4.1From callbacks to promises
    2. B4.2async/await and error handling
    3. B4.3Sequential and parallel
    4. B4.4Timers, setImmediate and process.nextTick
    5. B4.5Build: a parallel folder-size report
  5. B5Events, input and first tests5 of 5 written · 5 lessonsRuns on your computer

    React to events, read user input and test the result

    You build: A tested to-do CLI

    1. B5.1The EventEmitter
    2. B5.2Reading input with readline
    3. B5.3Tests with node:test and node:assert
    4. B5.4node --test and watch mode
    5. B5.5Build: a tested to-do CLI

Beginner project

Logbook CLI

A command-line journal that adds, lists, filters and exports tagged entries in a JSON file, fails clearly on a corrupt file and has a node:test suite.

Runs on your computerSelf-checked against a rubric

Open the project guide

Intermediate

Coming soon

After this level you can

  • Build a JSON HTTP API with node:http only, including routing, body parsing, status codes and graceful shutdown
  • Process large files with streams and pipeline(), respecting backpressure
  • Test an HTTP service with node:test, using mocks, fake timers and coverage, and call other services with fetch
  • Run TypeScript files directly with Node.js type stripping and type-check them separately with tsc
  1. I1HTTP with node:httpComing soon · 6 lessonsRuns on your computer

    Serve and consume JSON over HTTP without a framework

    You build: A notes REST API

    1. I1.1Coming soon
    2. I1.2Coming soon
    3. I1.3Coming soon
    4. I1.4Coming soon
    5. I1.5Coming soon
    6. I1.6Coming soon
  2. I2Buffers and streamsComing soon · 5 lessonsRuns on your computer

    Process data larger than memory

    You build: A streaming CSV-to-NDJSON converter

    1. I2.1Coming soon
    2. I2.2Coming soon
    3. I2.3Coming soon
    4. I2.4Coming soon
    5. I2.5Coming soon
  3. I3Testing in depthComing soon · 5 lessonsRuns on your computer

    Test services with isolation and coverage

    You build: A test suite for the notes API with a coverage threshold

    1. I3.1Coming soon
    2. I3.2Coming soon
    3. I3.3Coming soon
    4. I3.4Coming soon
    5. I3.5Coming soon
  4. I4Errors, processes and configurationComing soon · 5 lessonsRuns on your computer

    Handle failures and signals like a production service

    You build: A task runner that spawns commands

    1. I4.1Coming soon
    2. I4.2Coming soon
    3. I4.3Coming soon
    4. I4.4Coming soon
    5. I4.5Coming soon
  5. I5TypeScript on Node.jsComing soon · 5 lessonsRuns on your computer

    Run and type-check TypeScript with Node.js

    You build: Porting the notes CLI to TypeScript

    1. I5.1Coming soon
    2. I5.2Coming soon
    3. I5.3Coming soon
    4. I5.4Coming soon
    5. I5.5Coming soon

Intermediate project

Link-checker API

A node:http service that checks a list of URLs with fetch at limited concurrency, streams results as NDJSON and shuts down cleanly on SIGTERM.

Runs on your computerSelf-checked against a rubric

Advanced

Coming soon

After this level you can

  • Find and fix event-loop blocking, memory leaks and hot paths with the inspector, CPU profiles, heap snapshots and perf_hooks
  • Move CPU-bound work to worker threads, and explain when cluster or child processes fit better
  • Harden a service with the permission model, node:crypto for hashing and tokens, input validation and dependency auditing
  • Package and publish a library with conditional exports, and ship a command-line tool as a single executable
  1. A1Event loop and performanceComing soon · 5 lessonsRuns on your computer

    Find and remove event-loop blocking

    You build: Fixing a slow endpoint and proving it with numbers

    1. A1.1Coming soon
    2. A1.2Coming soon
    3. A1.3Coming soon
    4. A1.4Coming soon
    5. A1.5Coming soon
  2. A2ConcurrencyComing soon · 5 lessonsRuns on your computer

    Use worker threads and processes where they help

    You build: A hashing service off the main thread

    1. A2.1Coming soon
    2. A2.2Coming soon
    3. A2.3Coming soon
    4. A2.4Coming soon
    5. A2.5Coming soon
  3. A3Debugging and diagnosticsComing soon · 5 lessonsRuns on your computer

    Debug live processes and memory problems

    You build: Finding and fixing a leak in a sample service

    1. A3.1Coming soon
    2. A3.2Coming soon
    3. A3.3Coming soon
    4. A3.4Coming soon
    5. A3.5Coming soon
  4. A4SecurityComing soon · 6 lessonsRuns on your computer

    Harden a Node.js service

    You build: A hardened file service

    1. A4.1Coming soon
    2. A4.2Coming soon
    3. A4.3Coming soon
    4. A4.4Coming soon
    5. A4.5Coming soon
    6. A4.6Coming soon
  5. A5Data and distributionComing soon · 5 lessonsRuns on your computer

    Store data locally with node:sqlite and ship code to others

    You build: Packaging the capstone command-line tool

    1. A5.1Coming soon
    2. A5.2Coming soon
    3. A5.3Coming soon
    4. A5.4Coming soon
    5. A5.5Coming soon

Advanced project

Job queue with workers

A service that runs CPU-heavy jobs in a worker pool, stores state in node:sqlite, survives a restart and runs under the permission model.

Runs on your computerSelf-checked against a rubric

Capstone

Capstone

A self-hosted service of your choice

A small service, such as an RSS reader, combining HTTP, streams, storage, tests, TypeScript and security, published as a package or single executable.

Runs on your computerSelf-checked against a rubric

Sources