We do introduce getCloudflareContext (see bindings docs) and mention it a few times, however the utility has some nuances such as:
- it requires
initOpenNextCloudflareForDev to be called
- it can't be called in static routes
- it relies on local data (for example
.dev.vars and local KVs)
So it might be worth it to create a new how-to page dedicated to getCloudflareContext to exemplify some of these aspects
Original conversation: opennextjs/opennextjs-cloudflare#330 (comment)