Skip to content

Commit 7c4920b

Browse files
committed
chore: updates config to use postgres direct & pooling connections
1 parent fe92f7f commit 7c4920b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/javascript/fullstack_demo/.env.example.postgres

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=Your Next Public Clerk Publishable Key here
22
CLERK_SECRET_KEY=Your Clerk Secret Key here
33
DB_TYPE=postgres
44
NEXT_PUBLIC_API_URL=http://localhost:3000
5-
DATABASE_URL=Your Postgres database URL
5+
DATABASE_URL=Your Postgres connection pooling database URL
6+
DIRECT_URL=Your Postgres direct database URL

lib/javascript/fullstack_demo/prisma/schema.prisma

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ generator client {
33
}
44

55
datasource db {
6-
provider = "postgresql"
7-
url = env("DATABASE_URL")
6+
provider = "postgresql"
7+
url = env("DATABASE_URL")
8+
directUrl = env("DIRECT_URL")
89
}
910

1011
/// This table has subclasses and requires additional setup for migrations. Visit https://pris.ly/d/table-inheritance for more info.

0 commit comments

Comments
 (0)