mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 01:37:40 +02:00
15 lines
490 B
TypeScript
15 lines
490 B
TypeScript
import { Pool } from 'pg';
|
|
import { drizzle } from 'drizzle-orm/node-postgres';
|
|
import * as schema from '../shared/schema';
|
|
|
|
// Production database configuration using standard PostgreSQL
|
|
const pool = new Pool({
|
|
connectionString: process.env.DATABASE_URL,
|
|
ssl: false, // Docker internal connection doesn't need SSL
|
|
max: 20, // Maximum number of connections
|
|
idleTimeoutMillis: 30000,
|
|
connectionTimeoutMillis: 2000,
|
|
});
|
|
|
|
export const db = drizzle(pool, { schema });
|
|
export { pool }; |