Skip to content

Commit 19f7fb2

Browse files
authored
removed incorrect connection string (#169)
1 parent c9fce20 commit 19f7fb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pages/cloudflare/howtos/db.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const getDb = cache(() => {
8282
const { env } = getCloudflareContext();
8383
const connectionString = env.HYPERDRIVE.connectionString;
8484
const pool = new Pool({
85-
connectionString: process.env.PG_URL,
85+
connectionString,
8686
// You don't want to reuse the same connection for multiple requests
8787
maxUses: 1,
8888
});
@@ -94,7 +94,7 @@ export const getDbAsync = cache(async () => {
9494
const { env } = await getCloudflareContext({ async: true });
9595
const connectionString = env.HYPERDRIVE.connectionString;
9696
const pool = new Pool({
97-
connectionString: process.env.PG_URL,
97+
connectionString,
9898
// You don't want to reuse the same connection for multiple requests
9999
maxUses: 1,
100100
});

0 commit comments

Comments
 (0)