This is a template for building a Cloudflare Worker.
It uses Hono as the underlying framework that handles routing, body parsing, and much more. TypeScript is used for type safety, along with TypeScript ESLint. Wrangler is Cloudflare's official CLI that handles deployment and local development. GitHub Actions lint the codebase and deploy to Cloudflare on push. Prettier is used for code formatting. The package manager is pnpm.
-
Use this template on GitHub.
-
Create an API token on Cloudflare with the default Edit Workers template and set it as a repository secret named
CLOUDFLARE_API_TOKEN
. -
Rerun the failed deploy run.
Creative Commons Zero v1.0 Universal (Public Domain)