hiya, im desperately trying to
hiya, im desperately trying to understand how to use drizzle, hyperdrive and nextjs on edge but i swear im not getting past the env.HYPERDRIVE.connectionString step 🥲
has anyone dealt with some like this before?
7 Replies
Depends which db host provider you use. Let's assume it's neon https://developers.cloudflare.com/hyperdrive/examples/neon/
I suggest connecting to neon with Hyperdrive first in Worker, then gradually adding drizzle and nextjs
thank you, my problem was trying to use cloudflare pages instead of cloudflare workers 🥲
I don't think it's that different. Pages support Hyperdrive binding
Cloudflare Docs
Bindings · Cloudflare Pages docs
A binding enables your Pages Functions to interact with resources on the Cloudflare developer platform. Use bindings to integrate your Pages Functions with Cloudflare resources like KV, Durable Objects, R2, and D1. You can set bindings for both production and preview environments.
i will try to use opennext with cf workers, if that works and i can get the context for the env, imma stick to that, if it doesnt, i will look deeper into it, thank you for the quick response :bibicat: