Workers
CreatedApr 4, 2026UpdatedMay 28, 2026Takeshi Takatsudo
Standalone Cloudflare Workers and Wrangler configuration
Cloudflare Workers are serverless functions that run at the edge. They can be standalone services or part of a Pages project (as Pages Functions).
Workers vs Pages Functions
| Workers | Pages Functions | |
|---|---|---|
| Deployment | wrangler deploy | wrangler pages deploy (with static site) |
| Routing | Custom routes or *.workers.dev | File-based from functions/ directory |
| Use case | Standalone APIs, webhooks, proxies | API endpoints alongside a static site |
| Config | Full wrangler.toml | wrangler.toml for bindings only |
When to Use Standalone Workers
Use standalone Workers when:
- The function is a separate service (e.g., search worker, AI chat worker)
- You need custom domains or routing
- The worker has its own release cycle independent of the static site
- You need features not available in Pages Functions
In This Section
- Wrangler Config — Configuration file format and options
- Standalone Workers — Deploying independent Workers
- Compatibility Dates — Understanding and managing compatibility dates
- Durable Objects — WebSocket Hibernation and SQLite-backed Durable Objects
- Static Assets — the [assets] binding, run_worker_first, and the preview-URL trap