https://kotlinlang.org logo
Title
d

darkmoon_uk

07/10/2021, 7:44 AM
After reading the documentation on Ktor Modules, I'm unclear on what advantage there is (if any) to separating a Ktor Server into different 'modules' vs just breaking down a single module into sub-functions for organisation. In particular; it's not stated whether installing a Plugin is scoped to the current module or global to the Application.
a

Aleksei Tirman [JB]

07/12/2021, 11:51 AM
A plugin installation is global to the Application.
c

CLOVIS

07/12/2021, 8:15 PM
Is it really? Why is it specified in a module then
a

Aleksei Tirman [JB]

07/13/2021, 9:19 AM
In my understanding module is just an extension function that you can point to in a HOCON config or call directly in tests.