import * as u from "./utils.mjs"; import { buildServer, defaultInterceptors } from "./hero.mjs"; const listProducts = req => ({ status: 200 }); const getProduct = req => ({ status: 200 }); const getChat = req => ({ status: 200, body: "something\n" }); const server = buildServer([ [ "GET", "/products", listProducts ], [ "GET", "/products/:id", getProduct ], [ "GET", "/chat", getChat ], ], defaultInterceptors); export const app = async udsPath => { await server.listen(udsPath); u.log({ type: "starting-server", udsPath }); };