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

18 lines
443 B
TypeScript
Raw Normal View History

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import type { Context } from 'https://edge.netlify.com/'
2023-08-08 00:35:05 +00:00
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 })
}
}