worker-template

Cloudflare Worker template with Hono, Wrangler, TypeScript, and ESLint

CC0-1.0 License

Stars
0
Committers
2

worker-template

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.

Getting started

  1. Use this template on GitHub.

  2. Create an API token on Cloudflare with the default Edit Workers template and set it as a repository secret named CLOUDFLARE_API_TOKEN.

  3. Rerun the failed deploy run.

License

Creative Commons Zero v1.0 Universal (Public Domain)

Related Projects