Created
October 15, 2018 11:14
-
-
Save vinaymavi/dce76381ea315bf4fd4e55bbb08e70a9 to your computer and use it in GitHub Desktop.
Node.js configuration management example src/config/index.js file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const env = process.env.ENV || "DEV"; | |
switch (env) { | |
case "DEV": | |
module.exports = require("./development.config"); | |
break; | |
default: | |
module.exports = require("./production.config"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment