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

Env loading for nodejs #140

Closed
tj opened this Issue Jan 24, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@tj
Member

tj commented Jan 24, 2016

Few options:

  • rename to env.json so it's nicer to require()
  • require that the users install and require('apex')() to bootstrap our runtime stuff
  • inject the following script:
try {
  var config = require('./.env.json');
  for (var key in config) {
    process.env[key] = config[key]
  }
} catch (err) {
  // ignore
}

I like the idea of it being transparent because I wouldn't be too surprised if AWS adds env support at some time, then we can just transition nicely to that.

@mthenw

This comment has been minimized.

Show comment
Hide comment
@mthenw

mthenw Jan 24, 2016

Collaborator

Also been thinking about that and I would also do injection :)

Collaborator

mthenw commented Jan 24, 2016

Also been thinking about that and I would also do injection :)

@tj tj modified the milestone: v0.6.0 Jan 28, 2016

@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Jan 28, 2016

Member

I just realized if we inject for nodejs and the shim, we can remove it from the go runtime

Member

tj commented Jan 28, 2016

I just realized if we inject for nodejs and the shim, we can remove it from the go runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment