Select the two identical launches of the Ktor application.
1)
fun main() {
embeddedServer(Netty, port = 8080, configure = {
callGroupSize = 10
connectionGroupSize = 2
workerGroupSize = 5
}) {
routing {
get("/") {
call.respondText("Hello World!")
}
}
}.start(wait = true)
}
2)
fun main(args: Array<String>) {
EngineMain.main(args)
}
fun Application.module() {
routing {
get("/") {
call.respondText("Hello, world!")
}
}
}
application.conf:
ktor {
deployment {
port = 80
callGroupSize = 10
connectionGroupSize = 2
workerGroupSize = 5
}
application {
modules = [ com.example.ApplicationKt.module ]
}
}
3)
fun main() {
embeddedServer(Netty, port = 8080) {
routing {
get("/") {
call.respondText("Hello!")
}
}
}.start(wait = true)
}
4)
fun main(args: Array<String>) {
EngineMain.main(args)
}
fun Application.module() {
routing {
get("/") {
call.respondText("Hello, world!")
}
}
}
application.conf:
ktor {
deployment {
port = 8080
callGroupSize = 10
connectionGroupSize = 2
workerGroupSize = 5
}
application {
modules = [ com.example.ApplicationKt.module ]
}
}
5)
fun main() {
embeddedServer(Netty, port = 8080, configure = {
requestReadTimeoutSeconds = 10
responseWriteTimeoutSeconds = 10
}) {
routing {
get("/") {
call.respondText("Hello World!")
}
}
}.start(wait = true)
}
6)
fun main(args: Array<String>) {
EngineMain.main(args)
}
fun Application.module() {
routing {
get("/") {
call.respondText("Hello, world!")
}
}
}
application.conf:
ktor {
deployment {
port = 80
}
application {
modules = [ com.example.ApplicationKt.module ]
}
}