Hey folks, looking for experiences on DI with Ktor...
# ktor
r
Hey folks, looking for experiences on DI with Ktor. What's the "typical setup" like - just creating modules (either with Koin/Kodein or manually) and passing them into the extension functions? Has anyone experimented with a library like Kotlin-Inject with Ktor? Thanks in advance!
a
I typically don’t do anything fancy here. I like my route handlers to extract necessary stuff from the request and pass it on to functions that handles business logic, and use the return value from those functions to craft a response
but you could easily replace my “plain functions” with “get a module and invoke it” from a DI system 🙂