StaffCoder
Node.js
4 modules · 16 challengesSign up
Module 3 of 4 · 4 challenges

Node.js (TypeScript) Responses & Status Codes

Shape what goes out - map each outcome to its status and set the headers that go with it (Location, Accept, Cache-Control, request-id), with one consistent body and error shape. Covers redirects and idempotency, JSON/CSV content negotiation, and response-shaping middleware.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Allotment Plot Responses

Sign up to unlock
—No data yeteasy
About this challenge

A community-garden plot service that hides errors inside "success" replies. Every outcome must carry the correct signal, with one consistent error shape and no body where none belongs.

Solved in a browser IDE and graded by tests. Sign up to solve

Work Order Creation Semantics

Sign up to unlock
—No data yeteasy
About this challenge

A maintenance work-order service where clients can't find an item after creating it. Replies must point clients to the new item's address, and repeating an action must not double it up.

Solved in a browser IDE and graded by tests. Sign up to solve

Employee Directory Content Negotiation

Sign up to unlock
—No data yeteasy
About this challenge

An organisation wants the same employee directory as JSON for its intranet app and as a spreadsheet (CSV) for HR. The service returns whichever the client asks for, correctly formatted and escaped.

Solved in a browser IDE and graded by tests. Sign up to solve

Public Pricing API

STAR
Solving it completes the module
—No data yeteasy
About this challenge

A pricing service that should shape every reply the same way - a tracking id, caching hints, a consistent wrapper - without each route repeating the code. Handlers return data; a shared step finishes the response.

Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.