Closed tom-huntington closed 7 months ago
Hey! ๐ Apologies for the delayed response here. This is something we're actively looking at improving. @dario-piotrowicz is currently working on something for Next.js, but we're exploring ideas for other frameworks too. ๐
Yeah this is some problem we're very aware of and we're exploring ideas on how to improve this. ๐
PS: Unfortunately what I am doing for our Next.js adaptor is very Next specific so it's a bit unlikely that anything from there can be reused for other frameworks ๐
For what it's worth, this is a major stumbling block preventing us from moving a lot of applications to cloudflare. Not being able to dev with bindings is a showstopper.
@gerhardcit
You can now get around this with https://github.com/james-elicx/cf-bindings-proxy
Thx. Initial testing seems that this is working well.
Hi all ๐
I'm closing the issue as I believe it to be outdated and that the current situation with full stack frameworks and bindings is much better than it was when this issue was opened.
We've implemented the getPlatformProxy
utility that frameworks are also taking advantage of in order to provide access to bindings in their dev servers.
For example, among others, that is used in Remix, SvelteKit and Astro.
We're also exploring the possibility to have full stack frameworks run their dev code inside our runtime (providing a very faithful representation of what the actual production application will work like) via the Vite Environment API proposal ๐ค
I hope this works for you @tom-huntington, if not please feel free to reopen this issue ๐๐
With
npm create cloudflare@latest
in astro and svelte thenpm run dev
command doesn't have cloudlfare bindings available. However, it remix it does. It seems the difference is that remix is not using the--proxy
flagwhile astro
wrangler pages dev --compatibility-date=2023-07-15 --proxy 3000 -- astro dev
and sveltewrangler pages dev --compatibility-date=2023-07-15 --proxy 5173 -- npm run dev
are using--proxy
.You can now get around this with https://github.com/james-elicx/cf-bindings-proxy
Anyway, this just tripped me up so I though I'd share