freshyo/apps/backend/worker.ts
2026-03-27 01:59:26 +05:30

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)
},
}