Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/content/docs/pages/functions/bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,14 @@ If you set up the Service binding via the Cloudflare dashboard, you will need to

For example, to develop locally, if your Worker is called `my-worker`, run `npx wrangler dev` in the `my-worker` directory. In a different terminal, also run `npx wrangler pages dev <OUTPUT_DIR> --service MY_SERVICE=my-worker` in your Pages project directory. Interact with this Service binding by using `context.env` (for example, `context.env.MY_SERVICE`).

Wrangler also supports running your Pages project and bound Workers at once with one command. To try it out, pass multiple -c flags to Wrangler, like this: `wrangler dev -c wrangler.toml -c ../other-worker/wrangler.toml`. The first config must point to your Pages configuration file,and the remaining configs will be accessible via a service binding from your Pages project.

:::caution

Support for running multiple Workers at once with one Wrangler command is experimental, and subject to change as we work on the experience. If you run into bugs or have any feedback, [open an issue on the workers-sdk repository](https://github.com/cloudflare/workers-sdk/issues/new)

:::

<Render file="cli-precedence-over-file" />

## Queue Producers
Expand Down
Loading