46 lines
714 B
JavaScript
46 lines
714 B
JavaScript
// Update with your config settings.
|
|
|
|
const { fail } = require("assert");
|
|
|
|
require('dotenv').config()
|
|
|
|
if (!process.env.DB_URL) {
|
|
fail("Ensure you set DB_URL");
|
|
}
|
|
|
|
/**
|
|
* @type { Object.<string, import("knex").Knex.Config> }
|
|
*/
|
|
module.exports = {
|
|
|
|
development: {
|
|
client: 'postgresql',
|
|
connection: process.env.DB_URL
|
|
},
|
|
|
|
staging: {
|
|
client: 'postgresql',
|
|
connection: process.env.DB_URL,
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
tableName: 'knex_migrations'
|
|
}
|
|
},
|
|
|
|
production: {
|
|
client: 'postgresql',
|
|
connection: process.env.DB_URL,
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
tableName: 'knex_migrations'
|
|
}
|
|
}
|
|
|
|
};
|