Mark Stosberg

Results 532 comments of Mark Stosberg
trafficstars

I want to comment on this code pattern: ``` const config = get('my.config.path'); ``` Here I presume that `config` is being set an object. So you are following up with...

@davojan If you call bare `get` and `has`, what clue the code reader that these functions are related to configuration? Lodash has a method named `get`. You could rename during...

@davojan I don't think it will hurt anything to explicitly bind `get` to `config`. Feel free to submit a PR and make sure tests pass.

Closing. The module wasn't being imported correctly.

What about including the country or I18N code in the "instance" value? ex: 'production_US', production_FR', etc ?

You might also look at the Localize.js service: https://localizejs.com/ That's how we are solving i18n with our app that also uses `node-config`.

There is nothing to communicate to whether a custom environment variable is required or optional. We shouldn't warn about optional values being missing-- that's expected. You can set `somevalue: undefined`...

I'm concerned adding the environment variable to the name could confuse other cases, where the developer was usally expected to provide a config value, not an environment variable. For example,...

@dmsteinberg I've labeled this issue [pr-welcome]. :smiley:

Is it fair to interpret this issue as not being just about `setModuleDefaults()` but more generally the issue `require('config')` is cached and thus represents only one configuration at a time?