Merge pull request #1552 from MHajoha/bugfix/sequelize-cli-dynamic-config

Allow Sequelize CLI to use options set in config.json
This commit is contained in:
Raccoon 2020-07-28 01:58:05 +08:00 committed by GitHub
commit 374bda0489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -2,8 +2,8 @@ const path = require('path')
const config = require('./lib/config')
module.exports = {
config: path.resolve('config.json'),
config: path.resolve('config.js'),
'migrations-path': path.resolve('lib', 'migrations'),
'models-path': path.resolve('lib', 'models'),
url: process.env['CMD_DB_URL'] || config.dbURL
url: config.dbURL
}

3
config.js Normal file
View File

@ -0,0 +1,3 @@
const config = require('./lib/config')
module.exports = config.db