Skip to content

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 a team and james-elicx 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

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

@vicb vicb merged commit f8dbb7e into main Jul 7, 2025
1 check passed
@vicb vicb deleted the dario/add-remote-bindings-doc branch July 7, 2025 16:43
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