I use express and sequelize for the creation of a web server. I use the CLI of sequelize for the creation of models and migrations.
I would like to change the config.json to config.js in order to be able to use environment variables.
I followed the documentation and created the `.sequelizerc' file as follows =>
const path = require('path');
module.exports = {
'config': path.resolve('config', 'config.js'),
'models-path': path.resolve('models'),
'seeders-path': path.resolve('seeders'),
'migrations-path': path.resolve('migrations')
}
This works as it should for the CLI sequelize, I can create models or start migrations but I can't start the server because it looks for the file config.json.
So my question is how to make sure that when the server starts, it is able to read config.js.
When i run node bin/www i receive
Error: Cannot find module '/nodeTest/nodejs-relationships/models/../config/config.json'