Skip to content

Commit

Permalink
monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
haffi96 committed Oct 14, 2023
1 parent 557150f commit e601edb
Show file tree
Hide file tree
Showing 6 changed files with 7,370 additions and 2,580 deletions.
8 changes: 5 additions & 3 deletions aws/backend/db/session.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// db.ts
import { drizzle } from "drizzle-orm/node-postgres"
import { Pool } from "pg"
import pg from "pg"
import { config as dotEndConfig } from "dotenv"

dotEndConfig()

const pool = new Pool({
const pool = new pg.Pool({
connectionString: process.env.DATABASE_URL,
ssl: process.env.ENV === "local" ? false : { rejectUnauthorized: false },
})

export const db = drizzle(pool)
export const db = drizzle(pool)

export default db
Loading

0 comments on commit e601edb

Please sign in to comment.