twitch-bot/libs/database.js

13 lines
284 B
JavaScript
Raw Permalink Normal View History

2018-02-12 15:10:45 +00:00
const {Pool} = require('pg')
2018-02-12 15:08:42 +00:00
const config = require('../config')
2018-02-12 15:10:45 +00:00
const pool = new Pool({
user: config.database.user,
password: config.database.pass || null,
port: config.database.port,
host: config.database.host,
database: config.database.db_name
})
module.exports = pool