Remix migration
This commit is contained in:
12
server.ts
Normal file
12
server.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";
|
||||
import * as build from "@remix-run/dev/server-build.js";
|
||||
|
||||
const handleRequest = createPagesFunctionHandler({
|
||||
build,
|
||||
mode: process.env.NODE_ENV,
|
||||
getLoadContext: (context) => context,
|
||||
});
|
||||
|
||||
export function onRequest(context: RequestContext) {
|
||||
return handleRequest(context);
|
||||
}
|
Reference in New Issue
Block a user