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
yevgen
yevgen2w ago
Depends which db host provider you use. Let's assume it's neon https://developers.cloudflare.com/hyperdrive/examples/neon/
Cloudflare Docs
Connect to Neon · Hyperdrive
Connect Hyperdrive to a Neon Postgres database.
yevgen
yevgen2w ago
I suggest connecting to neon with Hyperdrive first in Worker, then gradually adding drizzle and nextjs
Maraciuca
MaraciucaOP2w ago
thank you, my problem was trying to use cloudflare pages instead of cloudflare workers 🥲
yevgen
yevgen2w ago
I don't think it's that different. Pages support Hyperdrive binding
yevgen
yevgen2w ago
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.
Maraciuca
MaraciucaOP2w ago
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:

Did you find this page helpful?