Node.js & Express APIs
Build Tally's back end: Node.js, HTTP and Express 5, a REST API for transactions and budgets with Zod validation, safe file storage, and the React app connected to it.
Modules
6
Lessons
36
Level
Intermediate
Project
Reviewed by a mentor
About This Course
Until now, Tally's data has lived in a mock API. In this course you replace it with a real back end. You learn how JavaScript runs on a server with Node.js, how HTTP works in depth, and how to build a REST API with Express. You build the API in two stages: first with data held in memory, then saved to a file, with clean separation between routes, logic and storage. That separation makes the move to a real database in the next course straightforward. As in every course before Course 17, AI is for explanations and brainstorming only: you write all your own code. Course project: the Tally REST API. Build the API for transactions, categories and budgets. Start with in-memory storage, then move to file storage behind a repository layer without changing the routes. Validate every request, support filtering, sorting and pagination, and connect the React app from Course 10 to your API in place of the mock.
You'll Be Able To
- Run JavaScript with Node.js and use its built-in modules, npm scripts and environment variables
- Explain the event loop and write asynchronous Node code with async/await
- Build an Express server with routes, middleware and centralised error handling
- Design and implement a REST API with validation, correct status codes and consistent error responses
- Structure a back end into routes, controllers, services and a storage layer
What's Inside
- 1
Node.js fundamentals
6 lessons
Run JavaScript outside the browser with Node.js: scripts and the REPL, ES modules, the path, os and fs modules, npm projects, and a command-line expense summary.
- 2
Asynchronous Node
5 lessons
Write Node code that never waits: the event loop, callbacks, promises and async/await, non-blocking file access, configuration with .env, and clear errors and exit codes.
- 3
HTTP and your first server
5 lessons
Understand HTTP methods, status codes and headers, build a server with Node's http module, then create the Tally API with Express 5 and test it with curl and an API client.
- 4
Routing and middleware
7 lessons
Grow the Tally API with route parameters, query strings and JSON bodies, write your own middleware and routers, handle errors in one place, and connect React with CORS.
- 5
Building the Tally API in memory
7 lessons
Design Tally's REST resources, write the API contract first, then build every endpoint (list, create, update, delete) with Zod validation and check it all with a script.
- 6
Persistence and structure
6 lessons
Make Tally's data survive restarts with safe file storage, structure the API into controllers, services and a repository, add paging, then connect the React app for real.