From 446658305820aca34d29629ad3ac524aa2a3c9d6 Mon Sep 17 00:00:00 2001 From: Daniel Berger Date: Sat, 30 Mar 2024 21:11:55 -0400 Subject: [PATCH] add back local database --- database/database.ts | 7 +++++++ env.mjs | 2 ++ 2 files changed, 9 insertions(+) diff --git a/database/database.ts b/database/database.ts index c4d1c21..66b80d4 100644 --- a/database/database.ts +++ b/database/database.ts @@ -7,3 +7,10 @@ export const db = drizzle(new RDSDataClient({}), { secretArn: Resource.SeistartDatabase.secretArn, resourceArn: Resource.SeistartDatabase.clusterArn, }) + +// For Local +// import { env } from "@/env.mjs" +// import { drizzle } from "drizzle-orm/postgres-js" +// import postgres from "postgres" +// export const client = postgres(env.DATABASE_URL) +// export const db = drizzle(client) diff --git a/env.mjs b/env.mjs index 2d86461..165be18 100644 --- a/env.mjs +++ b/env.mjs @@ -4,9 +4,11 @@ import { z } from "zod" export const env = createEnv({ server: { NEXTAUTH_JWT_SECRET: z.string(), + DATABASE_URL: z.string(), }, client: {}, runtimeEnv: { NEXTAUTH_JWT_SECRET: process.env.NEXTAUTH_JWT_SECRET, + DATABASE_URL: process.env.DATABASE_URL, }, })