14 lines
297 B
JavaScript
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
|