Module 4 — HTTP APIs and Request Handling
Lesson 2 — Request Size and Upload Safety
Unit 3 — Input Validation and Request Safety
Not finished yet
Topics
- Enforce file upload size limits
- Enforce request payload size limits
- Raw Node.js HTTP server construction
- Manual routing based on `req.url` and `req.method`
- Manual middleware composition
- Request validation with Zod
- Structured logging with Pino
- CORS and basic security headers
- Early route-level testing
- Build a JSON API for task management
- Store tasks in memory
- Implement `GET /tasks`, `POST /tasks`, `PUT /tasks/:id`, and `DELETE /tasks/:id`
- Parse JSON bodies safely
- Validate input with Zod
- Log every request with a request ID
- Set security-relevant headers manually
- Handle malformed JSON safely
- Enforce request body size limits
- Add a minimal route-level test suite
- Source repository
- README with API usage examples
- Curl or HTTPie examples
- Test evidence for success and failure cases
- Short architecture note explaining request flow