Next.js Discord

Discord Forum

Using Postgres Starter locally

Answered
Montenegrin Mountain Hound posted this in #help-forum
Open in Discord
Montenegrin Mountain HoundOP
Hi all,

I want to use https://github.com/vercel/nextjs-postgres-auth-starter/blob/main/.env.example, but with a local Postgres DB (as I'm heading on a flight, and would prefer to have locally).

What would I need to enter here for it locally?

Thanks
Answered by Montenegrin Mountain Hound
# Create a Postgres database on Vercel: https://vercel.com/postgres
POSTGRES_URL="postgres://postgres:password@localhost:5432/foggy_db"
POSTGRES_PRISMA_URL="postgres://postgres:password@localhost:5432/foggy_db?pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NON_POOLING="postgres://postgres:password@localhost:5432/foggy_db"
POSTGRES_USER="postgres"
POSTGRES_HOST="localhost"
POSTGRES_PASSWORD="password"
POSTGRES_DATABASE="foggy_db"



# Generate one here: https://generate-secret.vercel.app/32 (only required for localhost)
NEXTAUTH_SECRET=83b8605f3c1440e7aebb7ee90009330c
View full answer

2 Replies

Montenegrin Mountain HoundOP
Got it working!
Montenegrin Mountain HoundOP
# Create a Postgres database on Vercel: https://vercel.com/postgres
POSTGRES_URL="postgres://postgres:password@localhost:5432/foggy_db"
POSTGRES_PRISMA_URL="postgres://postgres:password@localhost:5432/foggy_db?pgbouncer=true&connect_timeout=15"
POSTGRES_URL_NON_POOLING="postgres://postgres:password@localhost:5432/foggy_db"
POSTGRES_USER="postgres"
POSTGRES_HOST="localhost"
POSTGRES_PASSWORD="password"
POSTGRES_DATABASE="foggy_db"



# Generate one here: https://generate-secret.vercel.app/32 (only required for localhost)
NEXTAUTH_SECRET=83b8605f3c1440e7aebb7ee90009330c
Answer