mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-20 21:01:18 -04:00
revert @neondatabase/serverless
This commit is contained in:
@@ -5,14 +5,16 @@ import ws from "ws";
|
||||
|
||||
// https://www.prisma.io/blog/serverless-database-drivers-KML1ehXORxZV#use-neon-with-neondatabaseserverless
|
||||
neonConfig.webSocketConstructor = ws;
|
||||
const connectionString = `${process.env.DATABASE_URL}`;
|
||||
|
||||
// creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the
|
||||
// number of connection pools available (especially when hot reloading from `next dev`).
|
||||
// https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices
|
||||
|
||||
const prismaClientSingleton = () => {
|
||||
const pool = new Pool({ connectionString });
|
||||
const pool = new Pool({
|
||||
connectionString: process.env.DATABASE_URL,
|
||||
ssl: true,
|
||||
});
|
||||
const adapter = new PrismaNeon(pool);
|
||||
return new PrismaClient({ adapter });
|
||||
};
|
||||
|
Reference in New Issue
Block a user