docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a simple task management API using Koa that handles CRUD operations for tasks. The API should support multiple HTTP methods to manage a collection of tasks.
Implement an API server with the following endpoints:
Each task should have:
id (string): A unique identifiertitle (string): The task titlecompleted (boolean): Whether the task is completedctx.request.bodyctx.status appropriately for each operation/**
* Creates and configures a Koa application with task management routes
* @returns {Koa} The configured Koa application
*/
function createApp() {
// Implementation here
}
module.exports = { createApp };Provides HTTP method-based routing for the Koa application.
Web framework for Node.js.
Middleware for parsing JSON request bodies.