Skip to content

Cloudflare Workers integration

Frames.js can be easily deployed to Cloudflare Workers.

Create a new project from template

npm 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.

npm run 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.

npm run deploy