Lesson 14.0

Orientation: what we are building this chapter

Artifact: A clear picture of the chapter's path and the CRUD API you'll finish with

1. The promise

You'll know exactly what this chapter builds toward: a working CRUD API written in plain Express, running on your laptop, exercised with curl and called from the Next.js front-end you built back in Block 4. You'll also know the order the chapter walks you through, and what you need installed before unit 14.1.

2. The mental model

A chapter is like a road trip. Before you drive off, you look at the map. Where do you start? Where do you stop for fuel? Where do you sleep? Where do you arrive? This orientation is that map. Once you see it, every later unit fits in a known slot.

The destination is a CRUD API. CRUD is short for create, read, update, delete — the four operations a long-lived data store supports. The thing you're building is an API (application programming interface): a contract that lets one program ask another program to do something, here over HTTP.

(DIAGRAM: the chapter path — flowchart — boxes for each unit topic, arrows showing dependency, with the CRUD API as the final box)

3. You do it, with me

There's nothing to install in this unit. Read along and check your machine.

The destination. A Node.js plus Express CRUD API for one resource (notes), running locally on port 3000, exercised with curl from the terminal and from the Next.js front-end you built in Ch 12.

The path the chapter takes. Server-as-concept, then Node, then a package manager. Then a server in raw Node. Then the same server in Express. Then routes. Then middleware. Then how to read data out of a request. Then how to send a response. Then errors that don't kill the process. Then env vars. Then logging. Then the full CRUD build. Then wire it to your Next.js front-end.

Why pure Express before NestJS. Ch 15 puts NestJS on top. NestJS hides the parts you'll learn here. You need to feel the moving parts first. Once you've built a route table by hand, NestJS controllers will read as named structure around things you already wrote.

Hardware and software to have ready. Before unit 14.1, check that you have:

  • Node.js 20 or newer.
  • pnpm (the package manager this course uses).
  • VSCode.
  • A working terminal — Terminal.app or iTerm on macOS, Windows Terminal with PowerShell on Windows.
  • A Next.js project from Ch 12 or Ch 13 still on disk. You'll wire to it in unit 14.16.

Run these two commands and check the output.

bashterminal — check Node and pnpm versions
node --version
pnpm --version

(SCREENSHOT: the Click to Career chapter index for Ch 14 — full window — the unit list visible)

(SCREENSHOT: terminal output of node --version and pnpm --version — full window — both version numbers visible)

(SCREENSHOT: VSCode with an empty project folder open — Explorer sidebar visible — full window)

If either command says "not found", unit 14.2 walks you through installing Node, and unit 14.3 walks you through installing pnpm. You can pause and come back to 14.0 after.

Honest time. About four and a half hours of guided units, plus an hour and a half for the assignment.

Tier policy. This unit is free preview. Everything after this is paid.

4. What you should be seeing

A clear picture of three things in your head:

  1. What you're building. A working Express CRUD API for notes, called from your Next.js front-end.
  2. The order the chapter takes. Concept, then Node, then package manager, then raw server, then Express, then the building blocks, then the full build, then wire it up.
  3. What's installed. Node 20+, pnpm, VSCode, a terminal, your Ch 12 project still on disk.

If you can say those back without scrolling up, you're done with this unit.

5. Common stumbles

  • You skip ahead to 14.15 because that's "the project". The earlier units are what make 14.15 land. Skipping them means 14.15 reads as magic.
  • You don't actually install the prerequisites and hit a wall in 14.2. Stop now. Install. Come back.
  • You confuse this chapter with "deploying a server to the cloud". That's Ch 24. This chapter runs everything on your laptop.

6. You should know

1/18
Next