Skip to content
Permalink
Newer
Older
100644 13 lines (11 sloc) 372 Bytes
October 19, 2023 16:49
1
import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";
2
// @ts-expect-error
3
import * as build from "@remix-run/dev/server-build";
October 19, 2023 16:49
4
5
const handleRequest = createPagesFunctionHandler({
6
build,
7
mode: process.env.NODE_ENV,
8
getLoadContext: (context) => context,
9
});
10
11
export function onRequest(context: RequestContext) {
12
return handleRequest(context);
13
}