Hello @Aleksei Tirman [JB]. it's been a while but let me ask the same question in a different way.
Is there any way to listen to two ports when i start the server using application.conf?
I just wanted to do the following
// in Application.kt
fun main(args: Array<String>) {
val env = applicationEngineEnvironment {
module {
backend()
frontend()
}
connector {
host = "0.0.0.0"
port = 8080
}
connector {
host = "0.0.0.0"
port = 3000
}
}
embeddedServer(Netty, env).start(true)
}
using application.conf. So, something I expected working was:
// Application.kt:
fun main(args: Array<String>) : Unit = EngineMain.main(args)
// application.conf:
ktor {
deployment {
port = 8080
host = "0.0.0.0"
}
deployment {
port = 3000
host = "0.0.0.0"
}
application {
modules = [ com.sample.ApplicationKt.backend, com.sample.ApplicationKt.frontend ]
}
}
Thanks.