Build your first Devflare worker with the smallest safe setup
- Best for
- New packages and first-time Devflare users
- Smallest safe shape
- One config and one fetch handler
- First commands
- , then , then
Get started
- 1
Run .
- 2
Create with an explicit fetch entry.
- 3
Add with one event-first handler.
- 4
Run before guessing env types by hand.
- 5
Run and make sure the smallest worker works before you add anything else.
Install Devflare and boot the worker
Start with two files, not a framework maze
Open the config first, then the fetch handler. That is enough to run, test, and understand before you add anything bigger.
Start building
Pick the next thing you actually need once the first worker is running.
Testing
Write your first unit test
Use the built-in harness before you invent mocks or wrappers.
Bindings
Try your first bindings
Make one Durable Object, one R2 bucket, or one browser-backed route work without overcomplicating the package.
HTTP
Need multiple URLs?
Add when a route tree is easier to reason about than one large fetch handler.
Bindings
Need storage choices?
Choose between KV, D1, R2, and Hyperdrive before you open the binding guide with the config and examples.
Bindings
Need state or background work?
Use the state and async patterns page to decide between Durable Objects, queues, or a mix of both.
Composition
Need worker composition?
Use service bindings and when another worker boundary is real, not just when one file feels crowded.
Frameworks
Need a framework host?
Only opt into Vite-backed mode when the current package actually has a local Vite or framework app.