Skip to content

Native Cloudflare resources

Use app.cloudflare for native Cloudflare resources that belong inside the same backend model.

Terminal window
app.cloudflare.kv({
binding: "FEATURE_FLAGS",
id: "kv-prod",
preview_id: "kv-preview",
})
app.cloudflare.r2({
binding: "UPLOADS",
bucket_name: "uploads-prod",
})

Available helpers:

  • app.cloudflare.wrangler(config, options?)
  • app.cloudflare.route(config, options?)
  • app.cloudflare.binding(config, options?)
  • app.cloudflare.resource(config, options?)
  • app.cloudflare.kv(config, options?)
  • app.cloudflare.r2(config, options?)
  • app.cloudflare.d1(config, options?)
  • app.cloudflare.workflow(config, options?)
  • app.cloudflare.durableObject(config, options?)
  • app.cloudflare.queue.producer(config, options?)
  • app.cloudflare.queue.consumer(config, options?)

Use Cloudflare Native for direct Cloudflare resource behavior.