awesome-compose/react-express-mongodb/server/config/config.js
Afzal a1153cea42 Sample React-Express-MongoDB
Signed-off-by: Afzal <sah.afzal@gmail.com>
2020-05-12 00:20:38 +05:00

13 lines
299 B
JavaScript

var env = process.env.NODE_ENV || 'development';
if(env === 'development' || env === 'test'){
const config = require('./config.json')
let envConfig = config[env];
console.log(envConfig);
Object.keys(envConfig).forEach((key) => {
process.env[key] = envConfig[key]
})
}