mtfosbot/libs/database.js

14 lines
297 B
JavaScript
Raw Normal View History

const pg = require('pg')
2018-07-13 05:30:54 +00:00
const config = require('@config/index')
const pool = new pg.Pool({
user: config.database.user,
password: config.database.pass || null,
host: config.database.host,
port: config.database.port,
2018-08-25 13:13:36 +00:00
max: 20,
database: config.database.dbname
})
2018-07-13 05:30:54 +00:00
module.exports = pool