0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 10:51:01 +00:00
hono/deno_dist/adapter/netlify/handler.ts
2023-08-08 09:35:05 +09:00

18 lines
443 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 '../../index.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 })
}
}