Hi! Where can I find an exhaustive explanation abo...
# ktor
f
Hi! Where can I find an exhaustive explanation about choosing between HOCON and Code configuration? I don't quite understand which way is more preferred.
1
j
To me it looks like it's easier to use environment variables with the hocon config
f
Yeah, it looks a little more comfortable. But I wanted to found a more "formal" description to use this approach in production =)
j
Copy code
For EngineMain, Ktor loads its configuration from an external file that uses the HOCON format. This way provides more flexibility to configure a server and allows you to change a configuration without recompiling your application. Moreover, you can run your application from a command line and override the required server parameters by passing corresponding command-line arguments.
f
I've read it. It seems to me I can achieve the same behavior with env variables only. Or am I wrong?
m
I can’t find good documentation about code configuration which is now the default option. Did you find anything @Joost Klitsie?