docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a lightweight API server that provides metadata about resources. The server should handle requests to check if resources exist and return appropriate information.
Create a Koa application with the following routes:
/api/resources/:id and returns metadata about a resource with the given ID/api/resources/123), the server should return a JSON response with resource details including an id field and a name field/**
* Creates and configures a Koa application with resource routes.
*
* @returns {Object} A configured Koa application instance
*/
function createApp() {
// IMPLEMENTATION HERE
}
module.exports = { createApp };{"id": "123", "name": "Resource A"} @testProvides the web application framework for building the API server.
Provides routing middleware for handling different API endpoints.