mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-22 19:07:54 +01:00
15 lines
343 B
JavaScript
15 lines
343 B
JavaScript
'use strict';
|
|
|
|
const knex = require('knex');
|
|
|
|
module.exports.createDb = function ({ databaseUri, poolMin = 2, poolMax = 20, databaseSchema = 'public' }) {
|
|
const db = knex({
|
|
client: 'pg',
|
|
connection: databaseUri,
|
|
pool: { min: poolMin, max: poolMax },
|
|
searchPath: databaseSchema,
|
|
});
|
|
|
|
return db;
|
|
};
|