Skip to content

Instantly share code, notes, and snippets.

@jewelsjacobs
Last active July 18, 2018 21:16
Show Gist options
  • Save jewelsjacobs/c05eedabcac422fdfae8 to your computer and use it in GitHub Desktop.
Save jewelsjacobs/c05eedabcac422fdfae8 to your computer and use it in GitHub Desktop.
[Require Env files dynamically] Snippet to load an env file dynamically #nodejs
'use strict';
module.exports = require(`./${process.env.NODE_ENV}.js`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment