bolt.new / functions /[[path]].ts
GamerC0der
Add application file
bf8b26e
import type { ServerBuild } from '@remix-run/cloudflare';
import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages';
export const onRequest: PagesFunction = async (context) => {
const serverBuild = (await import('../build/server')) as unknown as ServerBuild;
const handler = createPagesFunctionHandler({
build: serverBuild,
});
return handler(context);
};