Files
server/db.js
2023-08-30 17:46:22 -04:00

12 lines
383 B
JavaScript

import pg from 'pg'
export const pool = new pg.Pool({
connectionString: process.env.DEXORDER_DB_URL || 'postgres://dexorder:redroxed@localhost:5432/dexorder',
max: parseInt(process.env.DEXORDER_POOL_SIZE) || 10,
idleTimeoutMillis: parseInt(process.env.DEXORDER_POOL_TIMEOUT) || 10*60*1000,
})
pool.on('connect', (client) => {
client.query("SET TIME ZONE 'UTC'")
})