import http from "node:http"; const listProducts = () => {}; const getProduct = () => {}; const routes = { GET: { "/products": listProducts, "/products/:id": getProduct, }, }; const server = http.createServer((req, res) => { const { headers ,url, method } = req; console.log({ headers, url, method, }); res.writeHead(200, { "Content-Type": "text/plain", }); res.end("Hello, web!\n"); }); export const app = udsPath => { server.listen(udsPath, () => { console.log("I'm web."); }); };