Hello all! I have a question about multiple modules and Kodein:
How can I import a Kodein.Module into every ktor module? 🙂 As I can only install a feature once, I would like to know how to add a Kodein modules per ktor module that I launch
Joost Klitsie
04/20/2021, 7:53 AM
The idea is that I can launch modules separately and they can communicate with each other through an httpClient. OR I can launch modules together and they should be able to communicate directly with each other. I have already achieved this by using separate sourcesets and using a sniff of reflection on application start, but I think it is not sexy enough.
Joost Klitsie
04/20/2021, 7:53 AM
I think it would be better to launch the app with separate modules, which can in theory communicate with each other
Joost Klitsie
04/20/2021, 7:55 AM
I could use
subDI(closestDI) {...}
but that would make every module a child of the base module
Joost Klitsie
04/20/2021, 7:55 AM
and therefore they cannot see each others dependencies