Node.js Fundamentals: Modules, Async and Servers

Learn Node.js from modules and npm to async code, streams and a basic HTTP server. For JavaScript developers moving to backend and tooling work.

Start course →

What you'll learn

  • Explain the event loop and run scripts with Node.
  • Organize code with CommonJS and ES modules, and manage packages with npm.
  • Use core modules (fs, path, events, streams, http) confidently.
  • Write async code with callbacks, Promises and async/await, and handle errors safely.
  • Configure, debug, test and ship a small Node app or CLI tool.

Syllabus

Module 1: Getting Started

  1. What is Node.js?
  2. Installing Node.js
  3. Running Scripts & the REPL

Module 2: Modules

  1. CommonJS Modules
  2. ES Modules in Node
  3. Built-in, Third-Party & Local Modules

Module 3: NPM

  1. package.json & Semantic Versioning
  2. Installing Packages
  3. npm Scripts

Module 4: Core Modules

  1. The fs Module
  2. The path Module
  3. The os Module

Module 5: Events & Streams

  1. The EventEmitter Pattern
  2. Streams

Module 6: Building a Server

  1. The http Module

Module 7: Async Patterns

  1. Callbacks & Error-First Convention
  2. Promises in Node
  3. async/await
  4. CPU-Bound Work & Worker Threads

Module 8: Environment & Config

  1. process.env
  2. .env Files

Module 9: Error Handling

  1. try/catch in Async Code
  2. Uncaught Exceptions & Process Events

Module 10: Process & Child Processes

  1. The process Object
  2. Spawning Child Processes

Module 11: Debugging & Tooling

  1. Debugging Node
  2. Auto-Restart with nodemon

Module 12: Putting It Together

  1. Building a Tiny CLI Tool
  2. Publishing to npm
  3. Testing with node:test