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

Support loading configs from package.json/.npmrc #133

Open
LongLiveCHIEF opened this issue Mar 13, 2016 · 1 comment
Open

Support loading configs from package.json/.npmrc #133

LongLiveCHIEF opened this issue Mar 13, 2016 · 1 comment

Comments

@LongLiveCHIEF
Copy link
Contributor

I'd like to propose adding support for loading configs from npm compatible inputs, primarily the package.json file or .npmrc.

  • The file override could be enhanced to read either a .json or an .npmrc
  • The ENV key could be enhanced to support npm-config env vars
  • A new key could be added, which loads from the config block of the local package.json file

I think this could provide added benefit to the abilities of convict:

  • easier to use with CI testing tools, such as travis, which automatically take direction from the .npmrc
  • would enable the usage of two convict apps on the same system, without worrying about clashing env vars
  • would allow multiple config targets within a single application to do directory-recursive overrides (ex... a web app with 2 servers, a user front-end, and an admin dashboard, both can load the same config module, but receive the dynamic configuration described above)
@madarche
Copy link
Collaborator

@LongLiveCHIEF I find the idea interesting. What do other interested parties (@rfk, @vladikoff) think?

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

2 participants