Prompt Buddy logoPrompt Buddy

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.

Import to Prompt Buddy

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

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-testing-miniflare-multiple-workflow-guide.mdA 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.textA 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.textA 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.textA 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.textA 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.textA 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

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. 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