Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/db/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ if (!process.env.DATABASE_URL) {

const connectionString = process.env.DATABASE_URL;

// Create postgres connection
export const sql = postgres(connectionString);
// Create postgres connection with pool configuration
export const sql = postgres(connectionString, {
max: parseInt(process.env.DB_POOL_MAX || "20"),
idle_timeout: 20,
connect_timeout: 10,
});
Comment thread
coderabbitai[bot] marked this conversation as resolved.

// Create drizzle instance
export const db = drizzle(sql, { schema });
Expand Down
Loading