Cloudflare Docs
Workers
Visit Workers on GitHub
Set theme to dark (⇧+D)

Quickstarts

Quickstarts are GitHub repos that are designed to be a starting point for building a new Cloudflare Workers project. For the projects below, you simply run:

$ wrangler generate <new-project-name> <github-repo-url>
  • new-project-name

    • A folder with this name will be created with your new project inside, pre-configured to your Workers account .
  • github-repo-url

    • This is the URL of the GitHub repo starter, as below.

Templates

A bare-bones Workers starter project, in JavaScript.
wrangler generate my-app https://github.com/cloudflare/worker-template
A bare-bones Workers starter project, in TypeScript.
wrangler generate my-app https://github.com/cloudflare/worker-typescript-template
Easily deploy a static site or static assets to Cloudflare’s edge network.
wrangler generate my-app https://github.com/cloudflare/worker-sites-template
Run different logic based on the URL and request method. Use this starter to Build REST APIs or apps that require routing logic.
wrangler generate my-app https://github.com/cloudflare/worker-template-router
An example Cloudflare Workers project that uses Miniflare for local development, TypeScript, esbuild for bundling, and Jest for testing, with Miniflare's custom Jest environment.
wrangler generate my-app https://github.com/mrbbot/miniflare-typescript-esbuild-jest
A complete starter template using Sunder, TypeScript, Miniflare, esbuild, Jest, and Sass. Uses Worker Sites for static assets.
wrangler generate my-app https://github.com/sunderjs/sunder-worker-template
Hono is an ultrafast web framework built for Cloudflare Workers. This is a minimal project using Hono, TypeScript, esbuild, and Miniflare.
wrangler generate my-app https://github.com/yusukebe/hono-minimal

Frameworks

Lightning-fast, globally distributed Apollo GraphQL server, deployed at the edge using Cloudflare Workers.
wrangler generate my-app https://github.com/signalnerve/workers-graphql-server
Flareact is an edge-rendered React framework built for Cloudflare Workers. It features file-based page routing with dynamic page paths and edge-side data fetching APIs.
wrangler generate my-app https://github.com/flareact/flareact

Example Projects

Measure download / upload connection speed from the client side, using the Performance Timing API.
wrangler generate my-app https://github.com/cloudflare/worker-speedtest-template
Log exceptions and errors in your Workers application to Sentry.io - an error tracking tool
wrangler generate my-app https://github.com/bustle/cf-sentry
Retrieve the dominant color of a PNG or JPEG image
wrangler generate my-app https://github.com/xtuc/img-color-worker
Serve private AWS bucket files from a Worker script
wrangler generate my-app https://github.com/conzorkingkong/cloud-storage
Serve a JavaScript Binary AST via a Cloudflare Worker.
wrangler generate my-app https://github.com/xtuc/binast-cf-worker-template
Use AWS services such as DynamoDB and SQS from a Cloudflare Worker
wrangler generate my-app https://github.com/cloudflare/workers-aws-template
Use Vite to render pages at the edge with great DX. Includes i18n, markdown support and more.
wrangler generate my-app https://github.com/frandiox/vitessedge-template
Build a fast, globally distributed REST API using Cloudflare Workers and Fauna, the data API for modern applications.
wrangler generate my-app https://github.com/fauna-labs/fauna-workers

Other languages

Other languages may require you to install additional tools beyond wrangler. See the README.md file in the project.

A bare-bones starter in Rust.
wrangler generate my-app https://github.com/cloudflare/rustwasm-worker-template
A bare-bones starter in Python.
wrangler generate my-app https://github.com/cloudflare/python-worker-hello-world
A bare-bones starter in Scala.
wrangler generate my-app https://github.com/cloudflare/scala-worker-hello-world
Example usage of Workers KV in Scala.
wrangler generate my-app https://github.com/cloudflare/scala-worker-kv
A bare-bones starter in Reason.
wrangler generate my-app https://github.com/cloudflare/reason-worker-hello-world
A bare-bones starter in FSharp/Fable.
wrangler generate my-app https://github.com/fable-compiler/cfworker-hello-world
A bare-bones starter in Dart.
wrangler generate my-app https://github.com/cloudflare/dart-worker-hello-world
A bare-bones starter in Kotlin.
wrangler generate my-app https://github.com/cloudflare/kotlin-worker-hello-world
A bare-bones starter in COBOL.
wrangler generate my-app https://github.com/cloudflare/cobol-worker-template
A bare-bones starter in Perl.
wrangler generate my-app https://github.com/cloudflare/perl-worker-hello-world
A bare-bones starter in PHP.
wrangler generate my-app https://github.com/cloudflare/php-worker-hello-world
An image resizer in C compiled to Wasm with Emscripten.
wrangler generate my-app https://github.com/cloudflare/worker-emscripten-template

Built with Workers

Get inspiration from other sites and projects out there that were built with Cloudflare Workers.

Built with Workers