A curated list of awesome articles & code for Cloudflare Workers. They are similar to browsers' Service Workers, but in the cloud--flare.
Inspired by the awesome list. (A bit different, since the CSV dump contains many other links that didn't make the 'awesome' list.)
Please use the Link Suggestion Form to add an URL to this list. Use Issues only to fix something, suggest a new catgory, tag, etc.
- Cloudflare's Worker Forum / BBS - Offical community forum.
- Wrangler: offiical CLI tool (WASM, CLI, tool, Rust) (brief tutorial) - Available via
npm
&cargo
, can build & deploy JS, Rust, & C/C++ projects via templates. - Official Documentation - General docs, includes configurations, Cf KeyValue data store, and recipes.
- Official Blog - Cloudflare's blog posts tagged 'worker'.
- Diving into Technical SEO (article, optmimize, SEO, TypeScript) - Modifying incomming & outgoing requests, inject Hreflang tags,, redirects, etc.
- Serverless PWA using React (article, ReactJS, JS) (Cloudflare article builds up example script) - Terraform deploy srcipt included.
- Serverless Meetup with Cloudflare (video, JS) (cued to examples of CFWorker usage) - Several talks describing CfWorkers.
- image shrinking with WebAssembly (optmimize, image, WASM, C) - Image resizing that runs on Cloudflare's edge network.
- Official Serverless Quickstart (Serverless) - Guide to use the Serverless Plugin to deploy CfWorkers.
- URL shortener with LavaRand (route, app, JS) (short blog post) - Url shortener built with Cloudflare Workers and LavaRand.
- FSharp tutorial (app, F#) - FSharp example: CRUD contact manager.
- API gateway / redirect (REST, proxy, JS) (diagramed article on use case) - Reverse proxy layer to improve performance (HTTP1 vs HTTP2).
- Supercharge Google Fonts (optmimize, CDN, JS) (author's live site) - Inlines font requests with CfWorker, then caches in browser.
- Cryptocurrency API Gateway (gatekeeper, route, TypeScript) (blog post at CloudFlare) - Mini http request routing, then gateway to multiple crypto API providers in 1 file.
- Maintenance Mode static page (static, JS) - Includes PowerShell script to toggle.
- Apollo Server Cloudflare & Prisma Concept (JS) - Uses apollo-server-cloudflare to create a GraphQL server on Cloudflare Workers, and it also uses graphql-request to connect to a Prisma server.
- Hasura GraphQL Cloudflare Worker (auth, JS) - Example for Facebook-based authorization and GraphQL proxy queries with Hasura.
- GraphQL on Edge Workers (video, JS) (video demo) - Workers GraphQL Gateway Example.
- TypeScript Types and mocks (tool, template, TypeScript) - Simple example and/or starting point for a Cf worker script using TypeScript, WebPack, & Jest.
- Serverless framework Blueprint (Serverless, tool, deploy, JS) - Configure your
.env
, &serverless deploy
away. - Run Cloudflare Worker scripts locally (tool, JS) - Uses Docker, nice API, includes WASM build support.
- Codeship to automatically update your Cloudflare Workers (deploy, example, JS) - Automated Deployment.
- Serve cookie consent banner to EU visitors (inject, app, JS) (live demo) - Banner only shows if cllient is in EU.
- Set Google Analytics Client ID Cookie (article, analytics, JS) (article: Google Analytics ITP 2.1 Prevention ) - Fool Webkit's Intelligent Tracking Prevention,  HTTP Set-Cookie /snippet/.
- Workaround Cloudflare's Anti-DDoS Protection (tool, Rust) - Workaround Cloudflare Anti-DDoS Protection.
- Local cloudflare-workers-kv (KV, local-dev, JS) - Workers KV in your local environment or within a CF Workers env. Chunks large values above 64kB.
- KV interactive viewer (CLI, JS) - Nice CLI tool to explore keys & values of a Cloudflare account.
- CF KV Client for .NET (KV, .NET) - .NET Standard 1.4-2.0.
- cloudflare-worker-local (test, JS) - Test a Cloudflare Worker Locally.
- Kv Web Explorer (VueJS, KV, JS) - Vue.js SPA for viewing Cloudflare KV data.
- Cloudflare Workers Time Tests (test, JS) - Example development environment with three patterns for benchmarking Cloudflare edge workers.
- echo (test, TypeScript) - Echo back the request/response from worker point of view.
- x-host: override host proxy (proxy, JS) - Includes Chrome plugin. mimics WebPageTest's overrideHost command for local testing. Rewrite all requests to a different host while adding an x-Host header.
- proxies-on-cloudflare (proxy, loadbalance, TypeScript) - Proxies for Friebase & Mixpanel, simple routing, fallbacks, etc.
- simple todo list app using KV & 2 workers (app, frontend, KV, JS) (live demo) - Includes static HTML, get & put workers.
- app to flip images (app, image, WASM, Rust) - Uses Rust's wasm-pack-template.
- tools for creating an app (tool, Preact, TypeScript) - Build & deploy scripts.
- go/WASM AMP-transformer (AMP, WASM, GoLang) - Go/WASM port of the AMP packager transform library.
- Streaming Optimizations (optmimize, cache, JS) - Caches 3rd party scripts & dynamic HTML, inlines Google Fonts CSS. Non-streaming blocking version is avaiable.
- Blue / Green Deployments (test, deploy, proxy, JS) - Implementing Canary releasing and A/B testing, release versioning,bash scripts for deploying, uses cookies to lock in version.
- simple integration to Cloudflare Workers APIs (tool, deploy, JS) - Deploy workers, get & remove routs, KV storage, etc.
- Writing an API at the Edge with Firestore (article, app, GCS, JS) - Uses Google's Cloud Firestore for storage & JWT for authentication.
- Airtable Proxy Cloudflare Worker (AirTable, REST, security, JS) - Hides Airtable Base ID and API Key, Limit requests to specific methods and table, push updates via Travis-CL.
- routing middleware (route, tool, JS) - Basic routing handlers.
- hashing service (service, JS) - JSON responce with SHA1, SHA286, SHA384, & SHA512 hash responce.
- Preact Progressive Web App (frontend, optmimize, Preact, JS) (Preact worker demo) - Example PWA created by preact-cli.
- Wasabi CDN cheap website (static, CDN, TypeScript) - Serves static website from wasabi.com's cheap cloud storage.
- Thin wrapper for Cloudflare Workers KV (KV, JS) - Get, put, & delete for Cloudflare KV.
- CI/CD pipeline for CfWorkers using Serverless in Azure (article, CI/CD, Serverless) - Walkthough for a code pipeline with Serverless Framework.
- CI/CD with Azure (deploy, JS) - .
- DNS lookup and dig app (app, frontend, JS) (dnsjson.com - live app) - .
- Awesome Service Workers (JS) - Cf Service Workers are based on browser SW.
You are free to share & alter this, as long as you give credit & keep same license.