2019-03-25 02:57:33 +00:00
|
|
|
'use strict';
|
|
|
|
|
2019-05-06 00:01:57 +00:00
|
|
|
const config = require('config');
|
2019-03-25 02:57:33 +00:00
|
|
|
const knex = require('knex');
|
|
|
|
|
2019-05-06 00:01:57 +00:00
|
|
|
module.exports = knex({
|
2020-05-14 02:26:05 +00:00
|
|
|
client: 'pg',
|
2021-03-14 03:54:43 +00:00
|
|
|
connection: config.database.owner,
|
2023-12-01 01:19:53 +00:00
|
|
|
pool: config.database.pool,
|
2020-05-14 02:26:05 +00:00
|
|
|
// performance overhead, don't use asyncStackTraces in production
|
|
|
|
asyncStackTraces: process.env.NODE_ENV === 'development',
|
2020-12-19 22:01:17 +00:00
|
|
|
// debug: process.env.NODE_ENV === 'development',
|
2019-05-06 00:01:57 +00:00
|
|
|
});
|