Hi. Just starting with Koin in my ktor based backe...
# koin
d
Hi. Just starting with Koin in my ktor based backend microservice. In the Koin documentation specific to Ktor, there is a note that
"You can also start it from outside of Ktor, but you won't be compatible with autoreload feature"
. I am not using the autoreload feature and would like to instanciate koin earlier (I have some command line parsing and setup logic before I launch Ktor itself). What function should I use so that the Koin features are still available later in the ktor app?
a
use `startKoin`function to define your Koin app before starting Ktor (no install(Koin) in this case then). And then you're free to use ktor extension to retrieve dependencies inside ktor