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:

$ npm init cloudflare <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.
npm init cloudflare my-app https://github.com/cloudflare/worker-template
A bare-bones Workers starter project, in TypeScript.
npm init cloudflare my-app https://github.com/cloudflare/worker-typescript-template
Easily deploy a static site or static assets to Cloudflare’s edge network.
npm init cloudflare 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.
npm init cloudflare 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.
npm init cloudflare my-app https://github.com/mrbbot/miniflare-typescript-esbuild-jest
A complete starter template using Sunder, TypeScript, Miniflare, esbuild, Jest, and Sass. Uses Workers Sites for static assets.
npm init cloudflare 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, Miniflare, and Jest.
npm init cloudflare my-app https://github.com/honojs/hono-minimal

​​ Frameworks

Lightning-fast, globally distributed Apollo GraphQL server, deployed at the edge using Cloudflare Workers.
npm init cloudflare my-app https://github.com/signalnerve/workers-graphql-server
The most flexible, fastest, and lightest GraphQL server for all environments, Cloudflare Workers included.
npm init cloudflare my-app https://github.com/the-guild-org/yoga-cloudflare-workers-template
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.
npm init cloudflare my-app https://github.com/flareact/flareact

​​ Example Projects

Measure download / upload connection speed from the client side, using the Performance Timing API.
npm init cloudflare my-app https://github.com/cloudflare/worker-speedtest-template
Log exceptions and errors in your Workers application to Sentry.io - an error tracking tool
npm init cloudflare my-app https://github.com/bustle/cf-sentry
Retrieve the dominant color of a PNG or JPEG image
npm init cloudflare my-app https://github.com/xtuc/img-color-worker
Serve private AWS bucket files from a Worker script
npm init cloudflare my-app https://github.com/conzorkingkong/cloud-storage
Serve a JavaScript Binary AST via a Cloudflare Worker.
npm init cloudflare my-app https://github.com/xtuc/binast-cf-worker-template
Use AWS services such as DynamoDB and SQS from a Cloudflare Worker
npm init cloudflare 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.
npm init cloudflare 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.
npm init cloudflare 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.
npm init cloudflare my-app https://github.com/cloudflare/rustwasm-worker-template
A bare-bones starter in Python.
npm init cloudflare my-app https://github.com/cloudflare/python-worker-hello-world
A bare-bones starter in Scala.
npm init cloudflare my-app https://github.com/cloudflare/scala-worker-hello-world
Example usage of Workers KV in Scala.
npm init cloudflare my-app https://github.com/cloudflare/scala-worker-kv
A bare-bones starter in Reason.
npm init cloudflare my-app https://github.com/cloudflare/reason-worker-hello-world
A bare-bones starter in FSharp/Fable.
npm init cloudflare my-app https://github.com/fable-compiler/cfworker-hello-world
A bare-bones starter in Dart.
npm init cloudflare my-app https://github.com/cloudflare/dart-worker-hello-world
A bare-bones starter in Kotlin.
npm init cloudflare my-app https://github.com/cloudflare/kotlin-worker-hello-world
A bare-bones starter in COBOL.
npm init cloudflare my-app https://github.com/cloudflare/cobol-worker-template
A bare-bones starter in Perl.
npm init cloudflare my-app https://github.com/cloudflare/perl-worker-hello-world
A bare-bones starter in PHP.
npm init cloudflare my-app https://github.com/cloudflare/php-worker-hello-world
An image resizer in C compiled to Wasm with Emscripten.
npm init cloudflare 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