cloudflare · Cloudflare Workers Docs
Testing Multiple Workers
Configures and runs multiple Cloudflare Workers within a single Miniflare instance using the workers option, including setting up routing and accessing Durable Objects via script name bindings.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Testing Multiple Workers
Configures and runs multiple Cloudflare Workers within a single Miniflare instance using the workers option, including setting up routing and accessing Durable Objects via script name bindings.
When To Use
Use when you need to simulate a multi-service architecture locally using Miniflare, specifically for testing inter-worker communication via service bindings or routing requests to different scripts.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-testing-miniflare-multiple-workflow-guide.md | A guide explaining how to use the workers option in Miniflare to run and route multiple Workers within a single instance. | Questions about a guide explaining how to use the workers option in Miniflare to run and route multiple Workers within a single insta... |
examples/workers-testing-miniflare-multiple-cloudflare-workers-miniflare-multiple.text | A JavaScript code example demonstrating how to instantiate multiple Cloudflare Workers within a single Miniflare instance using service bindings and shared configuration. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to instantiate multiple Cloudflare Workers within a single Miniflare inst... |
examples/workers-testing-miniflare-multiple-cloudflare-workers-miniflare-multiple-2.text | A Miniflare configuration object demonstrating how to initialize and run multiple workers simultaneously within a single test environment. | Exact payloads, commands, or snippets shown in A Miniflare configuration object demonstrating how to initialize and run multiple workers simultaneously within a sin... |
examples/workers-testing-miniflare-multiple-cloudflare-workers-miniflare-multiple-3.text | A command line instruction demonstrating how to run Miniflare to test multiple workers simultaneously on different local ports. | Exact payloads, commands, or snippets shown in A command line instruction demonstrating how to run Miniflare to test multiple workers simultaneously on different lo... |
examples/workers-testing-miniflare-multiple-cloudflare-workers-miniflare-multiple-4.text | A text-based demonstration of dispatching requests to multiple workers using Miniflare. | Exact payloads, commands, or snippets shown in A text-based demonstration of dispatching requests to multiple workers using Miniflare. |
examples/workers-testing-miniflare-multiple-cloudflare-workers-miniflare-multiple-5.text | A JavaScript code example demonstrating how to use Miniflare to dispatch fetch requests to multiple workers simultaneously. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to use Miniflare to dispatch fetch requests to multiple workers simultane... |
What This Skill Covers
- Miniflare allows you to run multiple workers in the same instance. All Workers can be defined at the same level, using the workers option.
- Main sections:
Routing,Durable Objects.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/testing/miniflare/core/multiple-workers
