const { client, hono, handler } = registry.createServer()
const hono = new Hono()
app.use(cors({
origin: origin => origin ?? ' ',
credentials: true
}))
app.onError(errorHandler)
app.notFound(notFoundHandler)
app.route('/registry', hono)
// example rivet endpoints for counter (omitted)
// other routes (omitted)
Bun.serve({
...options,
routes: staticRoutes,
fetch: (req, server) => {
const ip = server.requestIP(req);
return app.fetch(req, { ...env, ip, server });
},
})
const { client, hono, handler } = registry.createServer()
const hono = new Hono()
app.use(cors({
origin: origin => origin ?? ' ',
credentials: true
}))
app.onError(errorHandler)
app.notFound(notFoundHandler)
app.route('/registry', hono)
// example rivet endpoints for counter (omitted)
// other routes (omitted)
Bun.serve({
...options,
routes: staticRoutes,
fetch: (req, server) => {
const ip = server.requestIP(req);
return app.fetch(req, { ...env, ip, server });
},
})