Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 1.1 KB

File metadata and controls

69 lines (44 loc) · 1.1 KB

Cloudflare Workers integration

Frames.js can be easily deployed to Cloudflare Workers.

::::steps

Create a new project from template

:::code-group

npm create frames -- --name my-cf-frames --template cloudflare-worker && cd ./my-cf-frames
yarn create frames --name my-cf-frames --template cloudflare-worker && cd ./my-cf-frames
pnpm create frames --name my-cf-frames --template cloudflare-worker && cd ./my-cf-frames

:::

Edit the generated Frame handler

Open src/index.tsx and edit the handler to your needs.

Develop and test locally

Run following command to start the local server and debugger to test your Frames app locally.

:::code-group

npm run dev
yarn dev
pnpm dev

:::

Deploy to Cloudflare Workers

When you are done with development and testing, run the following command to deploy your Frames app to Cloudflare Workers.

:::code-group

npm run deploy
yarn deploy
pnpm deploy

:::

::::