10 lines
332 B
TypeScript
10 lines
332 B
TypeScript
import type { ExecutionContext } from '@cloudflare/workers-types'
|
|
|
|
export default {
|
|
async fetch(request: Request, env: Record<string, string>, ctx: ExecutionContext) {
|
|
;(globalThis as any).ENV = env
|
|
const { createApp } = await import('./src/app')
|
|
const app = createApp()
|
|
return app.fetch(request, env, ctx)
|
|
},
|
|
}
|