Hello, what is a proper concept of DI in ktor? For...
# ktor
d
Hello, what is a proper concept of DI in ktor? For example I’m using kmongo ... how to make database as a singleton object and share it within entire application, all modules etc?
d
Ktor doesn’t force you to use dependency injection. Buy you can use it. There is a sample using guice here: https://github.com/ktorio/ktor-samples/tree/master/feature/guice
n