2020-05-12 13:16:03 +00:00
|
|
|
const env = process.env.NODE_ENV || "development";
|
2020-05-11 19:40:39 +00:00
|
|
|
|
2020-05-12 13:16:03 +00:00
|
|
|
if (env === "development" || env === "test") {
|
|
|
|
const config = require("./config.json");
|
|
|
|
const envConfig = config[env];
|
|
|
|
console.log(envConfig);
|
2020-05-11 19:40:39 +00:00
|
|
|
|
2020-05-12 13:16:03 +00:00
|
|
|
Object.keys(envConfig).forEach((key) => {
|
|
|
|
process.env[key] = envConfig[key];
|
|
|
|
});
|
2020-05-11 19:40:39 +00:00
|
|
|
}
|