Does someone know how to use multiple conf files f...
# ktor
h
Does someone know how to use multiple conf files for Ktor project ?
r
Is using
include
statements in your
application.conf
an option? Have a look at this: https://github.com/lightbend/config/blob/master/HOCON.md#include-semantics-file-formats-and-extensions
Basically, you can include additional config files in your
application.conf
by doing any variety of this:
Copy code
include "overrides.conf"

include require("overrides.conf") // Throws when file can't be found

include url("<http://example.com/overrides.conf|example.com/overrides.conf>")

include "overrides" // Loads any overrides.conf, overrides.json or overrides.properties
h
Yeah it should work. It's simply to have multiple files instead of a 2000 lines of conf in the same file.
Thanks a lot 🙂
r
No problem!
In general, having read the HOCON specification opens up a lot of additional possibilities that aren't obvious from the little you see in the Ktor docs. It's a good read!
h
Yeah, I'll try to read the link you sent me on HOCON, thanks a lot 🙂