Is there a way to listen on multiple ports with th...
# ktor
m
Is there a way to listen on multiple ports with the HOCON config
a
No, but you can do it with
embeddedServer
:
Copy code
fun main(args: Array<String>) {
    embeddedServer(Netty, applicationEngineEnvironment {
        connector {
            port = 8080
        }

        connector {
            port = 9090
        }

        module {
            routing {
                get("/") {
                    call.respondText { "Hello" }
                }
            }
        }
    }).start()
}