Skip to main content

Module 07 — Node.js + TypeScript

Welcome to the Backend

So far everything ran in the browser. Node.js lets you run JavaScript (and TypeScript) on a server — handling HTTP requests, reading files, connecting to databases, and anything that requires access to the operating system.

What's Different from the Browser

BrowserNode.js
window, documentprocess, __dirname
fetch (built-in)fetch (built-in v18+) or node-fetch
localStorageFile system (fs)
Single userMany concurrent users
Runs JS onlyRuns JS/TS with tsx or compiled output

Learning Objectives

  • Run TypeScript files directly with tsx
  • Use Node's built-in modules: fs, path, os, crypto
  • Parse command-line arguments
  • Read and write files (sync and async)
  • Organize code into npm packages

Module Lessons

  1. Node.js Fundamentals
  2. TypeScript in Node
  3. File System
  4. npm Packages

Challenge

Build a CLI tool — a README generator that prompts the user with questions (using inquirer) and outputs a formatted README.md.

View Challenge →