Skip to content
skillbld
Node.js · 14-day planAll days
Day 10 of 14 35 min

Design and build a REST API for a list of tasks. Map create, read, update and delete to HTTP methods and paths, read JSON request bodies safely, match route parameters like /tasks/:id, validate input, and return consistent errors.

By the end of today you can

  • Design REST endpoints for a resource
  • Read and parse a JSON request body, with a size limit
  • Match routes with parameters such as /tasks/:id
  • Validate input and return 400 with helpful messages
  • Return consistent status codes and error responses

What's inside

  • 5 sections
  • 2 diagrams and mind maps
  • 3 code examples you can run
  • 5-question quiz
  1. 1Designing the API
  2. 2Reading a JSON body
  3. 3Route parameters
  4. 4The complete API
  5. 5Never trust input

Sign in free to read this lesson

Get the full lesson with diagrams, runnable code and the quiz. Your progress is saved across devices.

Sign in free

Keep going

Day 10: Building a REST API · Node.js · SkillBld