Why do I often see ktor apps with the routing modu...
# ktor
n
Why do I often see ktor apps with the routing module using
install(Routing)
and others just declare routing directly? Is the install for the routing module really optional?
s
This is why https://github.com/ktorio/ktor/blob/main/ktor-server/ktor-server-core/jvmAndNix/src/io/ktor/server/routing/Routing.kt#L145-L147 Basically the first time you use
Copy code
routing {
    ...
}
it will install the plugin if it wasn’t installed already.