โ All finished work
Node HTTP server for notes with health, list, add, stats endpoints
Software4 deliveries25 min 33 s in total$0.76 in total
Step 1 of 4
The request
Node HTTP server for notes with health, list, add, stats endpoints
Read the full request
Build a small Node HTTP server in server.js with no dependencies, listening on the port given by the PORT environment variable. GET /health returns {"ok": true}. GET /api/notes returns the notes kept in notes.json in the working directory (an empty list at first), and POST /api/notes adds a note with a title and a body, refusing a missing title or body with 400 and a JSON error. GET /api/stats returns {"notes": <number of notes>}. Write a README that explains how to start the server and documents every route with an example. In the README every URL must be written as http://localhost:PORT with the literal word PORT, because the port is chosen at start-up; the README must not contain any numeric port.
The journey
Read the requestTurned it into a list of things it would have to prove before calling the work done.
Did the workPlanned the pieces, built them and checked the result as it went.
Delivered3 files handed over.
The result
- notes.json3 B
- README.md932 B
- server.js2.3 KB
Time4 min 26 s
Cost$0.50
Finished2026-09-28
Step 2 of 4
The request
Add note deletion with stable IDs and stats improvements
Read the full request
Extend the existing notes server without breaking its routes. Add DELETE /api/notes/:id, which removes the note and answers 204, or 404 with a JSON error for an unknown id; notes need a stable id, so give every note an id when it is created and keep existing notes working. GET /api/stats gains "oldest" and "newest", the creation times of the oldest and newest notes, or null when there are none. Update the README: document DELETE /api/notes/:id and the new stats fields with examples, keep every URL written as http://localhost:PORT with the literal word PORT, and end the README with a "Changelog" section listing, as bullet points, each route this change added or modified.
The journey
Read the requestTurned it into a list of things it would have to prove before calling the work done.
Did the workPlanned the pieces, built them and checked the result as it went.
Delivered3 files handed over.
The result
- notes.json3 B
- README.md1.7 KB
- server.js3.7 KB
Time7 min 58 s
Cost$0.10
Finished2026-09-28
Step 3 of 4
The request
Add PATCH and search to notes server, update README
Read the full request
Extend the existing notes server without breaking its routes. Add PATCH /api/notes/:id, which updates a note's title and/or body and answers the updated note, 400 with a JSON error when the title is present but empty, and 404 with a JSON error for an unknown id. Make GET /api/notes accept an optional q query parameter that returns only the notes whose title or body contains that text, case-insensitively; without q it returns every note as before. Update the README: document PATCH /api/notes/:id and the q parameter with examples, keep every URL written as http://localhost:PORT with the literal word PORT, and add both changes to the existing Changelog section as bullet points.
The journey
Read the requestTurned it into a list of things it would have to prove before calling the work done.
Did the workPlanned the pieces, built them and checked the result as it went.
Delivered3 files handed over.
The result
- notes.json161 B
- README.md2.4 KB
- server.js5.5 KB
Time7 min 07 s
Cost$0.09
Finished2026-09-29
Step 4 of 4
The request
Add note lookup by id and sorting to notes server
Read the full request
Extend the existing notes server without breaking its routes. Add GET /api/notes/:id, which answers the note with that id, or 404 with a JSON error for an unknown id. Make GET /api/notes accept an optional sort query parameter: sort=newest returns the notes newest first, sort=oldest oldest first, any other value answers 400 with a JSON error, and without sort the order is unchanged; it must still combine with the existing q filter. Update the README: document GET /api/notes/:id and the sort parameter with examples, keep every URL written as http://localhost:PORT with the literal word PORT, and add both changes to the existing Changelog section as bullet points.
The journey
Read the requestTurned it into a list of things it would have to prove before calling the work done.
Did the workPlanned the pieces, built them and checked the result as it went.
Delivered3 files handed over.
The result
- notes.json161 B
- README.md3.0 KB
- server.js6.2 KB
Time6 min 02 s
Cost$0.07
Finished2026-09-29