Skip to content

Commit

Permalink
Adding postgress
Browse files Browse the repository at this point in the history
  • Loading branch information
Wathfea committed Sep 3, 2024
1 parent c2f3080 commit c82a419
Show file tree
Hide file tree
Showing 5 changed files with 225 additions and 2 deletions.
10 changes: 10 additions & 0 deletions .env.development.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Created by Vercel CLI
JWT_SECRET="pullItSecret8998"
POSTGRES_DATABASE="verceldb"
POSTGRES_HOST="ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech"
POSTGRES_PASSWORD="KgPR8WF9ChJw"
POSTGRES_PRISMA_URL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech/verceldb?pgbouncer=true&connect_timeout=15&sslmode=require"
POSTGRES_URL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech/verceldb?sslmode=require"
POSTGRES_URL_NON_POOLING="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy.us-east-1.aws.neon.tech/verceldb?sslmode=require"
POSTGRES_URL_NO_SSL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech/verceldb"
POSTGRES_USER="default"
9 changes: 9 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
JWT_SECRET="pullItSecret8998"
POSTGRES_URL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech:5432/verceldb?sslmode=require"
POSTGRES_PRISMA_URL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech:5432/verceldb?sslmode=require&pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NO_SSL="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech:5432/verceldb"
POSTGRES_URL_NON_POOLING="postgres://default:KgPR8WF9ChJw@ep-delicate-darkness-a4rq0kuy.us-east-1.aws.neon.tech:5432/verceldb?sslmode=require"
POSTGRES_USER="default"
POSTGRES_HOST="ep-delicate-darkness-a4rq0kuy-pooler.us-east-1.aws.neon.tech"
POSTGRES_PASSWORD="KgPR8WF9ChJw"
POSTGRES_DATABASE="verceldb"
202 changes: 202 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"description": "",
"dependencies": {
"@prisma/client": "^5.19.1",
"@vercel/postgres": "^0.9.0",
"aws-sdk": "^2.1687.0",
"bcrypt": "^5.1.1",
"body-parser": "^1.20.2",
Expand Down
5 changes: 3 additions & 2 deletions prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ generator client {
}

datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
provider = "postgresql"
url = env("POSTGRES_PRISMA_URL") // uses connection pooling
directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection
}

model User {
Expand Down

0 comments on commit c82a419

Please sign in to comment.