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 HTTP server that logs incoming requests using a middleware-based architecture.
Create an HTTP server that:
/**
* Creates and starts an HTTP server with logging middleware.
*
* @param {number} port - The port number to listen on
* @returns {object} The HTTP server instance
*/
function createLoggerServer(port) {
// IMPLEMENTATION HERE
}
module.exports = { createLoggerServer };/test, the server responds with status 200 and JSON containing the request method and URL @test/data, the server responds with status 200 and JSON containing the request method and URL @testProvides HTTP server creation with middleware support.