Skip to content

add a section about local access in the Cloudflare bindings documentation #167

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

dario-piotrowicz
Copy link
Contributor

@dario-piotrowicz dario-piotrowicz commented Jun 26, 2025

add a section to the Cloudflare bindings documentation, documenting that:

  • bindings can be used both for dev and preview (this is already stated in the get started guide but I believe that it should also be included in the bindings documentation as well)
  • add information on remote bindings and how people can used them

Fixes opennextjs/opennextjs-cloudflare#457

@dario-piotrowicz dario-piotrowicz requested review from james-elicx and a team as code owners June 26, 2025 08:51
…tion

add a section to the Cloudflare bindings documentation, documenting that:
 - bindings can be used both for dev and preview
   (this is already stated in the get started guide but I believe
   that it should also be included in the bindings documentation as well)
 - add information on remote bindings and how people can used them
@dario-piotrowicz dario-piotrowicz force-pushed the dario/add-remote-bindings-doc branch from 4adf039 to 46956f1 Compare June 26, 2025 08:56
@@ -51,6 +51,35 @@ This will generate a `d.ts` file and save it to `worker-configuration.d.ts`.

To ensure that your types are always up-to-date, make sure to run `wrangler types --env-interface CloudflareEnv` after any changes to your config file.

## Local access to bindings
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "Local access to bindgins" sounds confusing vs the following "Remote bindings"

Maybe

## Access to bindings

### Local bindings

### Remote bindings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that this talks about remote bindings accessible locally, with the structure you're proposing, doesn't that make it sound like remote bindings accessible in your remote worker?

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have suggested a few simplifications, feel free to use or not.

Maybe add a common use case: use a prod DB during build when the cached pages are generated

@dario-piotrowicz
Copy link
Contributor Author

Maybe add a common use case: use a prod DB during build when the cached pages are generated

That's a good point, I actually haven't mentioned build at all, how does this look to you?
3c3fc27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Remote Bindings While Using Next Dev
3 participants