import * as u from "./utils.mjs"; import * as hero from "./hero.mjs"; const listProducts = req => ({ status: 200 }); const getProduct = req => ({ status: 200, body: "PRODUTO" }); const getSocket = req => ({ status: 200, body: "SOCKET" }); const server = hero.buildServer("papo", [ [ "GET", "/api/products", listProducts ], [ "GET", "/api/products/:id", getProduct ], [ "GET", "/api/socket", getSocket ], ]); export const app = async path => { await server.listen(path); hero.log.info({ type: "starting-server", path }); };