Relative Content

Tag Archive for kotlinktor

Is there a way to access the application object from a pluging (to add routes)

I want to organize my Ktor application feature wise, each feature being implemented as a Plugin. I managed to create a simple plugin using https://ktor.io/docs/server-custom-plugins-base-api.html, but now I need to create a plugin that will add some feature specific routes using the routing { ... } DSL. Therefore I need access to the application object. Does anyone know how to approach this?