Health check and readiness endpoints for web services — liveness probes,
97
99%
Does it follow best practices?
Impact
94%
3.61xAverage score across 4 eval scenarios
Passed
No known issues
Build a REST API for a task management application using Express and TypeScript. The service will be deployed behind an AWS Application Load Balancer in ECS containers.
Endpoints:
GET /api/todos -- list all todosPOST /api/todos -- create a todo (fields: title, description, dueDate)PATCH /api/todos/:id -- update a todoDELETE /api/todos/:id -- delete a todoUse a SQLite database via better-sqlite3 for persistence. Each todo has id, title, description, dueDate, completed, and createdAt fields.
Produce:
src/app.ts -- Express application setup with middleware and routessrc/routes/todos.ts -- Route handlers for todo CRUDsrc/db.ts -- Database setup and connectionpackage.json -- With dependencies listedDockerfile -- Multi-stage build for production deployment