▲ | epolanski 2 days ago | ||||||||||||||||||||||
Imho the best configuration file is code written in the language itself. Configuring TypeScript applications with the `defineConfig` pattern that takes asynchronous callbacks allowing you to code over settings is very useful. And it's fully typed and programmable. It's particularly useful because it also allows you to trivially use one single configuration file where you only set what's different between environments with some env === "local" then use this db dependency or turn on/off sentry, etc. Zig is another language that shows that configuration and building should just be code in the language itself. | |||||||||||||||||||||||
▲ | Terr_ 2 days ago | parent | next [-] | ||||||||||||||||||||||
> Imho the best configuration file is code written in the language itself. This depends on the trust-model for who is doing the configuration, especially if you're trying to host for multiple tenants/customers. Truly sandboxing arbitrary code is much harder than reading XML/JSON/etc. | |||||||||||||||||||||||
▲ | eternityforest 2 days ago | parent | prev [-] | ||||||||||||||||||||||
Programmatically manipulating it and validating it gets harder though. | |||||||||||||||||||||||
|