textbelt
textbelt copied to clipboard
Environment variable config settings?
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.
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.
I like that idea as well. It would simplify the implementation.