N
Neon6mo ago
quickest-silver

Prisma support for both serverless and non serverless

I run an open source app and people run the app in different ways. We use Prisma. Is there an easy way to make this work with and without Neon? Most self hosters won't use Neon so we want to make it work well in all cases: https://neon.tech/docs/guides/prisma#use-the-neon-serverless-driver-with-prisma
2 Replies
magic-amber
magic-amber6mo ago
Neon will work with most standard Postgres drivers (e.g., pg). That would be one option — where you'd only have to swap out the connection string when running on local Postgres instance vs Neon. If you wanted to use the Neon serverless driver in both cases (local Postgres instance or Neon), you'd have to set up a local Neon proxy to use the Neon serverless driver with the local Postgres instance. This "local development" doc describes how to set up a local Neon proxy: https://neon.tech/guides/local-development-with-neon @Rishi Raj Jain any additional thoughts here?
Neon
Local Development with Neon - Neon Guides
Learn how to develop applications locally with Neon
quickest-silver
quickest-silverOP6mo ago
ah for some reaosn i thought it was a different migrate for each one. ill just enable the preview feature. and then depending on the env setings ill if/else whether to use neonserverless or regular prisma postgres

Did you find this page helpful?