mtfosbot/libs/database.js
2018-08-25 21:13:36 +08:00

14 lines
297 B
JavaScript

const pg = require('pg')
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,
max: 20,
database: config.database.dbname
})
module.exports = pool