0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-30 19:30:47 +01:00
hono/deno_dist/adapter/netlify/handler.ts
2024-01-11 16:12:22 +09:00

18 lines
442 B
TypeScript

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import type { Context } from 'https://edge.netlify.com/'
import type { Hono } from '../../hono.ts'
export type Env = {
Bindings: {
context: Context
}
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const handle = (app: Hono<any, any>) => {
return (req: Request, context: Context) => {
return app.fetch(req, { context })
}
}