fun main() {
embeddedServer(Netty, port = 8000) {
routing {
get ("/") {
call.respondText("Hello, world!")
}
}
}.start(wait = true)
}
embeddedServer(Netty, port = 8000) {
routing {
get ("/") {
call.respondText("Hello, world!")
}
}
}.start(wait = true)
}
Why Ktor?
Kotlin and Coroutines
Ktor is built from the ground up using Kotlin and Coroutines. You get to use a concise, multiplatform language, as well as the power of asynchronous programming with an intuitive imperative flow.
Lightweight and Flexible
Ktor allows you to use only what you need, and to structure your application the way you need it. In addition you can also extend Ktor with your own plugin very easily.
Built and backed by JetBrains
Brought to you by JetBrains, creators of IntelliJ IDEA, Kotlin, and more. Ktor is not only used by our customers, but also internally at JetBrains. In addition, you have top-notch tooling support!