https://kotlinlang.org logo
#ktor
Title
# ktor
d

Damian Nowak

02/25/2023, 12:19 PM
Hi, is it better to use configuration as code or in HOCON file? Which is more flexible and less error prone? Default option is config in code in intellij when generating ktor project, but we need compile each time we changed configuration (?). Stupid question, but I couldn't find the answer
a

Andrew O'Hara

02/25/2023, 3:02 PM
I don't know if you'll get an objective answer to that. Personally, I prefer the flexibility and compile-time safety that configuration-as-code gives me. This doesn't mean you need to hardcode your properties; they can still come from external sources, like the env, or program arguments.
👍 1
11 Views