I'm trying to access my config.js file in all modules of my project but I can't even though the config file is defined as global.
Here's my packaging:
in the server.js I have defined:
global.config = require('./app/config');
I can access the properties of config in server.js but when I try to use config
in other files such as user.js I get this error:
config is not defined
I don't know how to fix the way I'm defining this global variable.