Build HTTP APIs with routing, middleware, validation, controllers, and error handling.
Lessons
Use HTTP cache headers and in-memory caches to cut work.
Caching Responses is easiest to learn by reading the example, changing it, and observing the result.
import express from 'express';
const app = express();
app.get('/api/lessons', (req, res) => {
res.set('Cache-Control', 'public, max-age=60');
res.json({ lessons: [], cachedFor: '60s' });
});
app.listen(3000);Practice the Caching Responses example in a small scratch file, then explain what changed and why.