Skip to content

Lesson 02 · Backend & Servers

Node.js: JavaScript on a Server

JavaScript beyond the browser: how Node runs your code with V8 plus host APIs, the REPL and ESM modules, process.env for secrets, and your first HTTP server with honest routing.

45 minintermediateServers, APIs & Data

Prerequisites: How the Web Works: Clients, Servers & HTTP

Learning objectives
By the end of this lesson, you will be able to:
  • Run JavaScript under Node.js, in the REPL and as module files with ESM imports
  • Import built-in modules like node:fs/promises and node:http, and keep secrets in process.env
  • Build a minimal HTTP server with createServer and answer requests with JSON
  • Route by method and path, separating the routing decision from the server plumbing