textbelt icon indicating copy to clipboard operation
textbelt copied to clipboard

Environment variable config settings?

Open pgibler opened this issue 7 years ago • 2 comments

Right now, the config settings are extracted from lib/config.js. It would be pretty desirable from a deployment point of view to allow developers using textbelt to override the config settings using environment variables. That would allow us to check out directly from the main github branch for textbelt (this repository) rather than create our own fork with the right config settings.

pgibler avatar Dec 19 '16 17:12 pgibler

An alternative could be to make the config settings file lib/config.s overridable at runtime (as a path reference to the file) via CLI arg or ENV variable, with it defaulting to lib/config.js if not overridden.

This way, keep the same setup but allow for easy reconfiguring. Having to override multiple config settings as ENV variables doesn't seem as nice if you have a lot to override. Just substitute at runtime with a different config.js file you store elsewhere.

daluu avatar Dec 19 '16 17:12 daluu

I like that idea as well. It would simplify the implementation.

pgibler avatar Dec 19 '16 21:12 pgibler