FlowForge/backend/knexfile.js

30 lines
637 B
JavaScript

require('dotenv').config();
module.exports = {
development: {
client: 'pg',
connection: process.env.DATABASE_URL || 'postgres://postgres:postgres@localhost:5432/flowforge',
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: './migrations'
}
},
production: {
client: 'pg',
connection: process.env.DATABASE_URL,
pool: {
min: 2,
max: 10
},
migrations: {
tableName: 'knex_migrations',
directory: './migrations'
},
ssl: process.env.DATABASE_SSL === 'true' ? { rejectUnauthorized: false } : false
}
};