INTEGRITY Cloudflare Docs

Local development

Test changes to your dynamic dispatch Worker by running the dynamic dispatch Worker locally but connecting it to user Workers that have been deployed to Cloudflare.

This is helpful when:

How to use remote dispatch namespaces

In the dynamic dispatch Worker's Wrangler file, configure the dispatch namespace binding to connect to the remote namespace by setting remote = true:

{
  "dispatch_namespaces": [
    {
      "binding": "DISPATCH_NAMESPACE",
      "namespace": "production",
      "remote": true
		}
  ]
}
[[dispatch_namespaces]]
binding = "DISPATCH_NAMESPACE"
namespace = "production"
remote = true

This tells your dispatch Worker that's running locally to connect to the remote production namespace. When you run wrangler dev, your Dispatch Worker will route requests to the User Workers deployed in that namespace.

For more information about remote bindings during local development, refer to remote bindings documentation.