Devflare Docs
Starter example Bindings

A small KV example you can adapt quickly

This example keeps KV boring on purpose: one binding, one fetch handler, one assertion.

The fastest way to trust a binding is to wire one small use case end to end before you hide it behind a bigger app.

Config focus
Stable namespace naming
Runtime shape
Direct and calls in a fetch handler
Best use
A tiny cache or session-marker flow

Start by wiring the binding clearly in config

Minimal KV config

Then use it in one honest runtime path

  • Run once the binding exists so is typed in both worker code and tests.
  • Prefer a tiny route like this before you wrap KV behind a helper or service layer.

A tiny fetch handler that uses KV

Lock in the behavior with one small test or smoke path

Start with the boring shape

If the first KV example already feels abstract, it is probably hiding the actual binding semantics instead of teaching them.

One tiny test is enough to trust the first version

Previous

Testing KV

Use the default test harness first. KV is one of the bindings Devflare supports best in local tests.

Next

D1

D1 gets the same stable-name authoring story as KV, but the runtime shape is relational: , , , and prepared statements.