cloudflare · Cloudflare Workers Docs
Workers Get Started
Teaches how to install, initialize, and configure the Miniflare API to simulate Cloudflare Workers environments, dispatch events, and manage local storage emulations for testing.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers Get Started
Teaches how to install, initialize, and configure the Miniflare API to simulate Cloudflare Workers environments, dispatch events, and manage local storage emulations for testing.
When To Use
Use when you need to set up a local testing environment to dispatch fetch or scheduled events to Workers and simulate connections to KV, R2, or Durable Objects.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-testing-miniflare-get-started-workflow-guide.md | A guide covering the installation, usage, and configuration of the Miniflare API for testing Cloudflare Workers locally. | Questions about a guide covering the installation, usage, and configuration of the Miniflare API for testing Cloudflare Workers locally. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-insta.text | The npm installation command required to add miniflare as a development dependency for testing Cloudflare Workers. | Exact payloads, commands, or snippets shown in The npm installation command required to add miniflare as a development dependency for testing Cloudflare Workers. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-insta-2.text | The yarn command used to add miniflare as a development dependency for testing Cloudflare Workers. | Exact payloads, commands, or snippets shown in The yarn command used to add miniflare as a development dependency for testing Cloudflare Workers. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-insta-3.text | The pnpm command used to add miniflare as a development dependency for testing Cloudflare Workers. | Exact payloads, commands, or snippets shown in The pnpm command used to add miniflare as a development dependency for testing Cloudflare Workers. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-bun-i.text | The shell command to install Miniflare as a development dependency using the Bun package manager. | Exact payloads, commands, or snippets shown in The shell command to install Miniflare as a development dependency using the Bun package manager. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-get-s.text | A basic configuration and code structure for initializing a Miniflare development environment for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A basic configuration and code structure for initializing a Miniflare development environment for Cloudflare Workers. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-get-s-2.text | A JavaScript code example demonstrating how to initialize and dispatch a fetch request using the Miniflare local development server. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to initialize and dispatch a fetch request using the Miniflare local deve... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas.text | A JavaScript code snippet demonstrating how to initialize a new Miniflare instance with a script path. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to initialize a new Miniflare instance with a script path. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-dispo.text | A code snippet demonstrating the use of the await mf.dispose() method within a Miniflare testing environment. | Exact payloads, commands, or snippets shown in A code snippet demonstrating the use of the await mf.dispose() method within a Miniflare testing environment. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-2.text | A JavaScript code snippet demonstrating how to instantiate and configure a Miniflare instance with script bindings and KV namespaces. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate and configure a Miniflare instance with script bindings an... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-3.text | A JavaScript code example demonstrating how to initialize and configure a Miniflare instance for testing Cloudflare Workers locally. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to initialize and configure a Miniflare instance for testing Cloudflare W... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-4.text | A JavaScript code snippet demonstrating how to initialize and run a Miniflare instance for testing Cloudflare Workers locally. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to initialize and run a Miniflare instance for testing Cloudflare Workers... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-5.text | A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with configuration options. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with configuration options. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-6.text | A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with configuration options. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with configuration options. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-dev-e.text | Configuration of environment variables to disable cf fetching and specify custom cache locations when running wrangler dev with Miniflare. | Exact payloads, commands, or snippets shown in Configuration of environment variables to disable cf fetching and specify custom cache locations when running wrangle... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-7.text | A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with HTTPS enabled. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with HTTPS enabled. |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-8.text | A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with optional HTTPS configuration options. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate a new Miniflare instance with optional HTTPS configuration... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-initi.text | A JavaScript code snippet demonstrating how to instantiate a Miniflare instance with optional HTTPS key and certificate configurations. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate a Miniflare instance with optional HTTPS key and certifica... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-9.text | A JavaScript code snippet demonstrating how to instantiate the Miniflare class with script paths and debug logging enabled. | Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to instantiate the Miniflare class with script paths and debug logging en... |
examples/workers-testing-miniflare-get-started-cloudflare-workers-miniflare-javas-10.text | A JavaScript code example demonstrating how to initialize and configure a Miniflare instance with logging, script paths, and module support. | Exact payloads, commands, or snippets shown in A JavaScript code example demonstrating how to initialize and configure a Miniflare instance with logging, script pat... |
What This Skill Covers
- The Miniflare API allows you to dispatch events to workers without making actual HTTP requests, simulate connections between Workers, and interact with local...
- Main sections:
Installation,Usage,String and File Scripts,Watching, Reloading and Disposing,Updating Options and the Global Scope.
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/get-started
