logoalt Hacker News

SifatAhmedtoday at 4:14 PM1 replyview on HN

This looks great. Question specifically on the Cloudflare Workers target: when you deploy there, does Typebase use D1 for the DB, or does the Postgres/Neon backend stay the same regardless of which server target you pick (Vercel/Workers/Deno) - i.e. is the DB layer decoupled from the server runtime, or does choosing Workers also mean choosing D1? I ask because I've shipped a small Workers+D1 service and the main friction I've hit isn't the server code, it's Workers' constraints around D1 (no long-running connections, HTTP-based driver quirks) - curious whether Typebase abstracts that away or whether you still feel it at the DB layer when targeting Workers specifically.


Replies

optimisticeditstoday at 4:49 PM

I see no code there to automatically pick D1 for the DB when you deploy to Cloudflare.

On Cloudflare, it should use the `@neondatabase/serverless` driver configured here https://github.com/typebase-io/monorepo/blob/fa3af0b71126caa...