✨ A personal knowledge base and curated code examples for exploring Cloudflare Workers, Email Workers, R2, KV, Durable Objects, and serverless tooling.
This repository is a living collection of notes, code snippets, and project experiments based on my exploration of Cloudflare Workers. It covers core features like Workers, Email Workers, KV, R2, Durable Objects, and other tools in the Cloudflare ecosystem.
- 🧠 Track my personal learning journey
- 🔬 Document use cases and testing scenarios
- ⚙️ Share practical examples with the community
| Folder | Description |
|---|---|
workers/ |
Basic HTTP request handling, middleware, async logic |
email-workers/ |
Handle inbound email, forwarding, parsing, etc. |
kv/ |
Key-Value storage operations and caching patterns |
r2/ |
File storage (upload/download) with R2 |
durable-objects/ |
State management at the edge |
bindings/ |
Environment bindings and secrets |
routing/ |
Custom domains, subrequests, and URL routing |
auth/ |
Basic authentication & token validation on the edge |
cloudflare-workers-research/
├── email-workers/
│ └── forward-example.js
├── kv/
│ └── rate-limiter.js
├── r2/
│ └── upload-to-r2.js
├── durable-objects/
│ └── counter-object.js
├── bindings/
│ └── secret-example.md
├── notes/
│ └── what-is-cloudflare-workers.md
└── README.md
You can clone this repo and run examples using wrangler:
git clone https://github.com/BensonNgu/cloudflare-workers.git
cd cloudflare-workers
# Run any example (with Wrangler v3)
wrangler dev path/to/example.jsThis project is licensed under the MIT License — see the LICENSE file for details.
Hi! I’m Benson Ngu, a developer exploring the edge of the web. I use this repo to log my discoveries and small experiments in the Cloudflare ecosystem.