T
TanStack10mo ago
generous-apricot

Development and deployment on Cloudflare (Pages)

I thought creating a Cloudflare thread could be helpful to myself and others in the future. I currently use https://github.com/nekochan0122/tanstack-start-with-cf-pages-env-vars in order to have a successful Cloudflare deployment with variables. This works for variable bindings both in dev and when deployed, but other bindings, such as D1, do not work in dev (using vinxi dev) Looking for an easier, more native solution. Has anyone had luck with the following?: https://nitro.build/deploy/providers/cloudflare#direct-access-to-cloudflare-bindings
GitHub
GitHub - nekochan0122/tanstack-start-with-cf-pages-env-vars
Contribute to nekochan0122/tanstack-start-with-cf-pages-env-vars development by creating an account on GitHub.
Cloudflare - Nitro
Deploy Nitro apps to Cloudflare.
7 Replies
generous-apricot
generous-apricotOP10mo ago
other-emerald
other-emerald9mo ago
I am still a bit stuck on how to use the bindings with TanStack Start, Cloudflare Pages and Cloudflare D1.
generous-apricot
generous-apricotOP9mo ago
Have you tried the setup shown in the repo I linked?
other-emerald
other-emerald9mo ago
I haven't but from your message I understand this doesn't work for bindings like D1 for development which is what I was trying to achieve.
generous-apricot
generous-apricotOP9mo ago
extended-salmon
extended-salmon9mo ago
I was hardstuck and in the end the problem was that I was using bun
other-emerald
other-emerald9mo ago
Thanks @Mozzy that is indeed what I still needed

Did you find this page helpful?