export onRequest function from shim.mjs

This commit is contained in:
syumai 2023-04-30 13:30:55 +09:00
parent de60dcaed9
commit b581579118

View File

@ -27,3 +27,10 @@ export async function scheduled(event, env, ctx) {
await run();
return runScheduler(event, { env, ctx });
}
// onRequest handles request to Cloudflare Pages
export async function onRequest(ctx) {
await run();
const { request, env } = ctx;
return handleRequest(request, { env, ctx });
}