Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Functionality to Export the vars loaded from env.json into process.env Object ? #9

Open
nelsonic opened this issue Jul 17, 2015 · 1 comment

Comments

@nelsonic
Copy link
Collaborator

Hi @dshaw,
We would really like to extend _env_ to make all configuration loaded from env.json available as process.env.VAR_NAME would you accept a PR for this extension.
This would simply be a loop to itterate over the entries in env.json and add them to the process.env object using your env.set method.

(100% backward compatibility will be maintained and 100% test coverage)
Let us know.
Thanks!

@nelsonic
Copy link
Collaborator Author

Such that the following test will pass:

test('export env.json to process.env', function (t) {
  var env = require('..')(env_json)
  var keys = Object.keys(env);
  keys.map(function(k){
    t.equal(env[k], process.env[k])
  })
  t.end()
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant