-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
docs: platformProxy.environment
for Cloudflare's local bindings
#14425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Preferences for the emulated `platform.env` local bindings. See the [getPlatformProxy](https://developers.cloudflare.com/workers/wrangler/api/#parameters-1) Wrangler API documentation for a full list of options. | ||
Preferences for the emulated `platform.env` local bindings. See the [getPlatformProxy](https://developers.cloudflare.com/workers/wrangler/api/#parameters-1) Wrangler API documentation for a full list of options. | ||
|
||
For local development, if you want to use cloudflare's local bindings like D1, KV etc., `platformProxy.environment` may be set, based on wrangler config env. For example if wrangler config has env, `main` for production build and `dev` or `staging` for non-production builds, `platformProxy.environment` can be set as `dev` or `staging`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloudflare should be capitalized
For local development, if you want to use cloudflare's local bindings like D1, KV etc., `platformProxy.environment` may be set, based on wrangler config env. For example if wrangler config has env, `main` for production build and `dev` or `staging` for non-production builds, `platformProxy.environment` can be set as `dev` or `staging`. | |
For local development, if you want to use Cloudflare's local bindings like D1, KV etc., `platformProxy.environment` may be set, based on wrangler config env. For example if wrangler config has env, `main` for production build and `dev` or `staging` for non-production builds, `platformProxy.environment` can be set as `dev` or `staging`. |
platformProxy.environment
for Cloudflare's local bindings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this to be wordy and repetitive. E.g. the existing sentence says that it's local and then you repeat twice more right off the bat that it's local. The Cloudflare docs just say "The environment to use." which I think is fully sufficient
I'm against documenting how Cloudflare's |
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits