Skip to content

Commit

Permalink
feat: add pages function handler for Cloudflare Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
bnleft committed Oct 31, 2024
1 parent 3077b24 commit 1489ab0
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/functions/[[path]].ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { createPagesFunctionHandler } from "@remix-run/cloudflare-pages";

// @ts-ignore - the server build file is generated by `remix vite:build`
import * as build from "../build/server";

export const onRequest = createPagesFunctionHandler({ build });
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"start": "remix-serve ./build/server/index.js"
},
"dependencies": {
"@remix-run/cloudflare-pages": "2.13.1",
"@remix-run/node": "^2.13.1",
"@remix-run/react": "^2.13.1",
"@remix-run/serve": "^2.13.1",
Expand Down
57 changes: 57 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1489ab0

Please sign in to comment.