Ktor - dynamically install and uninstall modules?

The Ktor examples I see are all statically defined in the Kotlin code. I’d like to be able to load and unload web apps, sort of like you do in servlet containers like Tomcat, Wildfly. Is that possible?

In other words, how do you define something like this so that it can be uninstalled?

fun Application.mymodule() {
    routing {
        get("/") {
            call.respondText("Hello World!")
        }
    }
}

If not, I guess the only way to deploy new code is to kill the ktor process and start another one. ?