Build HTTP APIs with routing, middleware, validation, controllers, and error handling.
Lessons
Tag each request so you can trace it across logs.
Request IDs and Tracing is easiest to learn by reading the example, changing it, and observing the result.
import express from 'express';
import morgan from 'morgan';
const app = express();
app.use(morgan('dev')); // logs method, url, status, response time
app.get('/api/lessons', (req, res) => res.json({ lessons: [] }));
app.listen(3000);Practice the Request IDs and Tracing example in a small scratch file, then explain what changed and why.