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