Skip to content

Instantly share code, notes, and snippets.

@vinaymavi
Created October 15, 2018 11:14
Show Gist options
  • Save vinaymavi/dce76381ea315bf4fd4e55bbb08e70a9 to your computer and use it in GitHub Desktop.
Save vinaymavi/dce76381ea315bf4fd4e55bbb08e70a9 to your computer and use it in GitHub Desktop.
Node.js configuration management example src/config/index.js file.
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