Skip to content

Commit e8ded22

Browse files
authored
fix: Refactor PrismaNeon initialization to use PoolConfig instead of Pool directly (#644)
1 parent dd58f27 commit e8ded22

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/database/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "server-only";
22

3-
import { neonConfig, Pool } from "@neondatabase/serverless";
3+
import { neonConfig } from "@neondatabase/serverless";
44
import { PrismaNeon } from "@prisma/adapter-neon";
55
import ws from "ws";
66
import { PrismaClient } from "./generated/client";
@@ -10,8 +10,7 @@ const globalForPrisma = global as unknown as { prisma: PrismaClient };
1010

1111
neonConfig.webSocketConstructor = ws;
1212

13-
const pool = new Pool({ connectionString: keys().DATABASE_URL });
14-
const adapter = new PrismaNeon(pool);
13+
const adapter = new PrismaNeon({ connectionString: keys().DATABASE_URL });
1514

1615
export const database = globalForPrisma.prisma || new PrismaClient({ adapter });
1716

0 commit comments

Comments
 (0)