fix: Allow Sequelize CLI to use options set in config.json

Adds a config.js which uses lib/config to provide the Sequelize CLI with the same options as the application.

Fixes #1396
Signed-off-by: Maximilian Haye <mhajoha@gmail.com>
This commit is contained in:
Maximilian Haye 2020-07-07 14:08:29 +02:00
parent 7b148457a7
commit 6862166064
No known key found for this signature in database
GPG Key ID: C32B1F8444511EA7
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