/* The portless handleRequest shape reduced to its bones: read url and * method, answer with writeHead(status, literal headers) + end(body). * The driver requests twice, then /quit closes the server. */ import { createServer } from "node:http"; const server = createServer((req, res) => { console.log(`${req.method} ${req.url}`); if (req.url === "/quit") { res.writeHead(200, { "content-type": "text/plain" }); res.end("bye"); server.close(() => console.log("server closed")); return; } if (req.url === "/missing") { res.writeHead(404, { "content-type": "text/html" }); res.end("