DeadAlready / node-easy-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot override folder option

allocaz opened this issue · comments

Hello,

Thanks for your module first.
It seems that i can't overrite the folder option using :

var config = require('easy-config').loadConfig({'folder': __dirname});
Is this right ?

As require('easy-config') already tries to load the configuration then if you don't have config/ folder it will return an error.

.loadConfig({'folder': __dirname}) can be used to load an additional configuration object from the specified folder, but no it will not allow to overwrite the original search location.

If you want to overwrite the configuration folder then you can use either an environment variable
running your code like 'node index.js -folder=/path/to/config'
or including env.json file in your execution directory where you can overwrite the folder setting.

Bonjour,

It's ok now.
Merci for responding so quickly.

Bonne semaine ; )