v3.0.0/knexfile.js

24 lines
546 B
JavaScript
Raw Normal View History

2019-02-21 15:49:29 +01:00
require('dotenv').config();
module.exports = {
client: process.env.DB_CLIENT,
connection: {
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
2019-02-21 16:00:07 +01:00
database: process.env.DB_DATABASE,
filename: 'database.sqlite'
2019-02-21 15:49:29 +01:00
},
pool: {
min: process.env.DATABASE_POOL_MIN || 2,
max: process.env.DATABASE_POOL_MAX || 10
},
migrations: {
directory: 'src/api/database/migrations'
},
seeds: {
directory: 'src/api/database/seeds'
2019-02-22 16:45:45 +01:00
},
useNullAsDefault: process.env.DB_CLIENT === 'sqlite' ? true : false
2019-02-21 15:49:29 +01:00
};