4 ms·
Another option is rather than storing configuration in config files, is to store it in code. After experimenting with different approaches, storing configuratio
by tybit 7y ago
Another option is rather than storing configuration in config files, is to store it in code.
After experimenting with different approaches, storing configuration in code and switching on a single environment variable ENV (or STAGE or whatever you like to call it) this is probably my favourite.
This doesn't work for everyones infrastructure setups, but it's worked well for mine.
- icebraining 7y agoA file that stores configuration is a configuration file, even if the encoding format happens to be the same as the main programming language and not toml or yaml :) That works fine if there's a limited number of environments, but it becomes a pain if you're running the same app in too many, or if someone else needs to deploy it independently of the developers.
- solipsism 7y agoit becomes a pain if you're running the same app in too many, No it doesn't. It's trivial to generate the full set of configs using a script, if you have too many to manage manually. or if someone else needs to deploy it independently of the developers And how exactly do envvars help with that? The set of envvars still needs to get pushed with each deployment. envvars are just a special config file.
- mixedCase 7y agoConvenient enough for dynamic languages. Not so much compiled ones.