Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Development & testing

Overview of local development workflows for Cloudflare Workers using Wrangler or Vite, including the use of Miniflare for runtime simulation and the configuration of local versus remote resource bindings.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Development & testing

Overview of local development workflows for Cloudflare Workers using Wrangler or Vite, including the use of Miniflare for runtime simulation and the configuration of local versus remote resource bindings.

When To Use

Use when you need to set up a local development environment for Cloudflare Workers or decide between using Wrangler or Vite for testing code before deployment.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-development-testing-index-38-workflow-guide.mdAn overview of core concepts for building, running, and testing Cloudflare Workers locally using Miniflare.Questions about an overview of core concepts for building, running, and testing Cloudflare Workers locally using Miniflare.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-com.textA text guide demonstrating the usage of the npx wrangler dev command for local development and testing of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text guide demonstrating the usage of the npx wrangler dev command for local development and testing of Cloudflare...
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-com-2.textA text representation of the wrangler dev command used for local development and testing of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text representation of the wrangler dev command used for local development and testing of Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-com-3.textA text snippet demonstrating the use of the pnpm wrangler dev command for local development of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the use of the pnpm wrangler dev command for local development of Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-vite-dev-command.textA text snippet demonstrating the npx vite dev command used for local development of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the npx vite dev command used for local development of Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-vite-dev-command-2.textA text snippet demonstrating the yarn vite dev command used for local development of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the yarn vite dev command used for local development of Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-vite-dev-command-3.textA text snippet demonstrating the pnpm vite dev command used for local development of Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the pnpm vite dev command used for local development of Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-toml-co.textA sample wrangler.toml configuration file demonstrating worker name, compatibility date, and R2 bucket bindings.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration file demonstrating worker name, compatibility date, and R2 bucket bindings.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-toml-co-2.textA sample wrangler.toml configuration file defining a worker name, compatibility date, and an R2 bucket binding.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration file defining a worker name, compatibility date, and an R2 bucket binding.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-toml-co-3.textA sample wrangler.toml configuration file demonstrating environment definitions and R2 bucket bindings for Cloudflare Workers.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration file demonstrating environment definitions and R2 bucket bindings for Cloudflare...
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-toml-co-4.textA sample wrangler.toml configuration file demonstrating environment settings and R2 bucket bindings for Cloudflare Workers.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration file demonstrating environment settings and R2 bucket bindings for Cloudflare Wo...
examples/workers-development-testing-index-38-cloudflare-workers-development-test.textA configuration example for the wrangler.toml file demonstrating browser binding settings for Cloudflare Workers development.Exact payloads, commands, or snippets shown in A configuration example for the wrangler.toml file demonstrating browser binding settings for Cloudflare Workers deve...
examples/workers-development-testing-index-38-cloudflare-workers-browser-binding-.textA configuration snippet demonstrating how to define a browser binding with remote access enabled in a Workers environment.Exact payloads, commands, or snippets shown in A configuration snippet demonstrating how to define a browser binding with remote access enabled in a Workers environ...
examples/workers-development-testing-index-38-cloudflare-workers-development-test-2.textA configuration example demonstrating how to define AI bindings and remote settings within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to define AI bindings and remote settings within a Cloudflare Workers envir...
examples/workers-development-testing-index-38-cloudflare-workers-development-test-3.textA configuration example demonstrating how to set up remote bindings for Workers development and testing.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to set up remote bindings for Workers development and testing.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-toml-co-5.textA sample wrangler.toml configuration file demonstrating vectorize binding settings for a Cloudflare Workers project.Exact payloads, commands, or snippets shown in A sample wrangler.toml configuration file demonstrating vectorize binding settings for a Cloudflare Workers project.
examples/workers-development-testing-index-38-cloudflare-workers-development-test-4.textA text example demonstrating how to configure a Vectorize binding within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A text example demonstrating how to configure a Vectorize binding within a Cloudflare Workers environment.
examples/workers-development-testing-index-38-cloudflare-workers-development-test-5.textA configuration example demonstrating certificate binding settings for Cloudflare Workers development and testing.Exact payloads, commands, or snippets shown in A configuration example demonstrating certificate binding settings for Cloudflare Workers development and testing.
examples/workers-development-testing-index-38-cloudflare-workers-mtls-certificate.textA configuration example demonstrating how to bind an mTLS certificate to a Cloudflare Worker using the mtls_certificates binding.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to bind an mTLS certificate to a Cloudflare Worker using the mtlscertificat...
examples/workers-development-testing-index-38-cloudflare-workers-development-test-6.textA configuration example demonstrating how to define image bindings and remote settings within a Cloudflare Workers environment.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to define image bindings and remote settings within a Cloudflare Workers en...
examples/workers-development-testing-index-38-cloudflare-workers-development-test-7.textA text-based overview of development and testing workflows for Cloudflare Workers.Exact payloads, commands, or snippets shown in A text-based overview of development and testing workflows for Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-development-test-8.textA configuration example for Cloudflare Workers development and testing using wrangler.toml syntax.Exact payloads, commands, or snippets shown in A configuration example for Cloudflare Workers development and testing using wrangler.toml syntax.
examples/workers-development-testing-index-38-cloudflare-workers-dispatch-namespa.textA configuration example demonstrating how to define a dispatch namespace binding in a Workers environment.Exact payloads, commands, or snippets shown in A configuration example demonstrating how to define a dispatch namespace binding in a Workers environment.
examples/workers-development-testing-index-38-cloudflare-workers-miniflare-setup.textA JavaScript code snippet demonstrating how to initialize and configure a Miniflare instance for local Workers development and testing.Exact payloads, commands, or snippets shown in A JavaScript code snippet demonstrating how to initialize and configure a Miniflare instance for local Workers develo...
examples/workers-development-testing-index-38-cloudflare-workers-miniflare-setup-.textA TypeScript code example demonstrating how to initialize and configure a Miniflare instance with KV namespace bindings for local development.Exact payloads, commands, or snippets shown in A TypeScript code example demonstrating how to initialize and configure a Miniflare instance with KV namespace bindin...
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-rem.textA text snippet demonstrating the command to run a Cloudflare Workers development server in remote mode using Wrangler.Exact payloads, commands, or snippets shown in A text snippet demonstrating the command to run a Cloudflare Workers development server in remote mode using Wrangler.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-rem-2.textA text snippet demonstrating the command to run the Wrangler CLI in remote development mode for Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the command to run the Wrangler CLI in remote development mode for Cloudflare Workers.
examples/workers-development-testing-index-38-cloudflare-workers-wrangler-dev-rem-3.textA text snippet demonstrating the command to run the Wrangler CLI in remote development mode for Cloudflare Workers.Exact payloads, commands, or snippets shown in A text snippet demonstrating the command to run the Wrangler CLI in remote development mode for Cloudflare Workers.

What This Skill Covers

  • You can build, run, and test your Worker code on your own local machine before deploying it to Cloudflare's network. This is made possible through Miniflare,...
  • Main sections: Core concepts, Worker execution vs Bindings, Local development, Defaults, Bindings during local development.

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/development-testing/index.md