What are some ways to be able to access `environme...
# ktor
m
What are some ways to be able to access
environment.config
outside of Application context? Other that passing it around. I’m thinking of using Koin to inject it where needed.
r
I map config properties to a singleton read-only data class with Koin. If you already use Koin in your app, injecting is likely the best approach
a
Also, since the config is immutable, you can create a config instance by calling the
ApplicationConfig
function, which will parse the config file and resolve the variables.