mirror of
https://github.com/Redume/Kekkai.git
synced 2025-02-23 12:43:12 +03:00
14 lines
379 B
JavaScript
14 lines
379 B
JavaScript
const pg = require("pg");
|
|
const yaml = require("yaml")
|
|
const fs = require("fs");
|
|
const config = yaml.parse(fs.readFileSync("./config.yaml", "utf-8"));
|
|
|
|
const pool = new pg.Pool({
|
|
user: config['db']['user'],
|
|
password: config['db']['password'],
|
|
host: config['db']['host'],
|
|
port: config['db']['port'],
|
|
database: config['db']['name']
|
|
});
|
|
|
|
module.exports = pool;
|