Fix db connection

This commit is contained in:
Gabriel Brown 2024-08-08 07:59:11 -05:00
parent 46ddc6d7f4
commit 17486bd00c

View File

@ -10,7 +10,7 @@ import postgres from "postgres"
import { drizzle } from "drizzle-orm/postgres-js" import { drizzle } from "drizzle-orm/postgres-js"
import type { AdapterAccountType } from "next-auth/adapters" import type { AdapterAccountType } from "next-auth/adapters"
const connectionString = "postgres://postgres:postgres@localhost:5432/drizzle" const connectionString = process.env.DATABASE_URL ?? "";
const pool = postgres(connectionString, { max: 1 }) const pool = postgres(connectionString, { max: 1 })
export const db = drizzle(pool) export const db = drizzle(pool)