Build a working REST API in Node.js from the ground up: start with the core http module, then move to Express to route requests, parse JSON bodies and return correct status codes. You will finish able to design and ship a full CRUD API over an in-memory store.
Watch the free preview
Creating an HTTP server with the http module — free to watch, no account needed.
What you'll learn
- Build a working REST API in Node.js with Express
- Create an HTTP server by hand with the core http module
- Route requests by method and path and return correct status codes
- Parse and validate JSON request bodies and send JSON responses
- Implement full CRUD over an in-memory store the RESTful way
Syllabus
The http Module — Your First Server
Creating an HTTP server with the http moduleFree preview
Reading requests and shaping responses
Routing and JSON by Hand
Routing by method and path
Handling JSON request bodies
Introducing Express
Getting started with Express and routing
The CRUD verbs and JSON bodies in Express
Building a CRUD REST API
Designing REST resources and status codes
A complete CRUD API over an in-memory store
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10