diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-22 13:07:02 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-22 13:07:02 +0200 |
| commit | be970248686c0af7d8506cba8c64bf507419da3d (patch) | |
| tree | 3fd8a716b7adae452f1be6dcdd946533da47ad8a /apps/web/src/lib/db/index.tsx | |
| parent | f2d27e578e6214598d36779f44fb1612764c7b3b (diff) | |
| download | opencut-be970248686c0af7d8506cba8c64bf507419da3d.tar.gz | |
so much stuff???
Diffstat (limited to 'apps/web/src/lib/db/index.tsx')
| -rw-r--r-- | apps/web/src/lib/db/index.tsx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/web/src/lib/db/index.tsx b/apps/web/src/lib/db/index.tsx new file mode 100644 index 00000000..b66c6e39 --- /dev/null +++ b/apps/web/src/lib/db/index.tsx @@ -0,0 +1,14 @@ +import { drizzle } from "drizzle-orm/node-postgres";
+import { Pool } from "pg";
+import * as schema from "./schema";
+
+const pool = new Pool({
+ connectionString: process.env.DATABASE_URL,
+ max: 3,
+ idleTimeoutMillis: 10000,
+ connectionTimeoutMillis: 15000,
+ query_timeout: 20000,
+ statement_timeout: 20000,
+});
+
+export const db = drizzle(pool, { schema });
|
