Scaffold an Express TODO API with GET /todos endpoint #3

Open
opened 2026-05-12 06:50:13 +00:00 by danny8632 · 1 comment
Owner

Goal

Scaffold a minimal Express server that exposes one read-only endpoint listing in-memory todo items. This is the first non-trivial agent task — it exercises multi-file scaffolding, npm install, and runnable code.

Done criteria

  • package.json exists with at least express as a dependency, and a start script that runs the server (e.g. node index.js)
  • index.js (or equivalent entry) starts an Express HTTP server on port 3000
  • GET /todos returns JSON: an array of at least 2 hardcoded todo objects with shape { id: number, title: string, done: boolean }
  • GET /healthz returns 200 with body { ok: true } (used by future CI)
  • .gitignore excludes node_modules
  • README.md includes a Run section explaining npm install && npm start
  • You verify the server actually starts and curl localhost:3000/todos returns the expected JSON before finishing

Hints

  • Keep dependencies minimal — just express.
  • No tests, no DB, no auth for v0. Just a runnable scaffold.
  • Use ES module or CommonJS, whichever you prefer; pick one and stick with it.
  • The repo is currently empty except for HELLO.md, LICENSE, README.md, .gitignore. Build alongside those; do not delete them.

Model

sonnet

## Goal Scaffold a minimal Express server that exposes one read-only endpoint listing in-memory todo items. This is the first non-trivial agent task — it exercises multi-file scaffolding, npm install, and runnable code. ## Done criteria - [ ] `package.json` exists with at least `express` as a dependency, and a `start` script that runs the server (e.g. `node index.js`) - [ ] `index.js` (or equivalent entry) starts an Express HTTP server on port 3000 - [ ] `GET /todos` returns JSON: an array of at least 2 hardcoded todo objects with shape `{ id: number, title: string, done: boolean }` - [ ] `GET /healthz` returns 200 with body `{ ok: true }` (used by future CI) - [ ] `.gitignore` excludes `node_modules` - [ ] `README.md` includes a `Run` section explaining `npm install && npm start` - [ ] You verify the server actually starts and `curl localhost:3000/todos` returns the expected JSON before finishing ## Hints - Keep dependencies minimal — just `express`. - No tests, no DB, no auth for v0. Just a runnable scaffold. - Use ES module or CommonJS, whichever you prefer; pick one and stick with it. - The repo is currently empty except for `HELLO.md`, `LICENSE`, `README.md`, `.gitignore`. Build alongside those; do not delete them. ## Model sonnet
Author
Owner

agent dev-01: PR opened → #4

agent dev-01: PR opened → https://gitea.dannyhaslund.dk/danny8632/todo-app/pulls/4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: danny8632/todo-app#3