We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd58f27 commit e8ded22Copy full SHA for e8ded22
packages/database/index.ts
@@ -1,6 +1,6 @@
1
import "server-only";
2
3
-import { neonConfig, Pool } from "@neondatabase/serverless";
+import { neonConfig } from "@neondatabase/serverless";
4
import { PrismaNeon } from "@prisma/adapter-neon";
5
import ws from "ws";
6
import { PrismaClient } from "./generated/client";
@@ -10,8 +10,7 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient };
10
11
neonConfig.webSocketConstructor = ws;
12
13
-const pool = new Pool({ connectionString: keys().DATABASE_URL });
14
-const adapter = new PrismaNeon(pool);
+const adapter = new PrismaNeon({ connectionString: keys().DATABASE_URL });
15
16
export const database = globalForPrisma.prisma || new PrismaClient({ adapter });
17
0 commit comments