1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/db/db-pool.js
2020-02-20 08:30:38 +01:00

15 lines
299 B
JavaScript

'use strict';
const knex = require('knex');
module.exports.createDb = function (databaseConnection, schema = 'public') {
const db = knex({
client: 'pg',
connection: databaseConnection,
pool: { min: 2, max: 20 },
searchPath: schema,
});
return db;
};