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)
}
Simple and fun
Ktor is an asynchronous framework for creating microservices, web applications, and more. It’s fun, free, and open source.
Latest release: 1.5.2
Why Ktor?
Lightweight
Use what you need. Ktor allows you to transparently configure only the functionality your project requires. No magic involved!
Extensible
Extend what you need. With a configurable pipeline, you can create the extensions you need and place them anywhere you want.
Multiplatform
Run it where you need it. Built from the ground up with Kotlin Multiplatform technology, you can deploy Ktor applications anywhere.
Asynchronous
Scales as you need it. Using Kotlin coroutines, Ktor is truly asynchronous and highly scalable. Use the power of non-blocking development without the callback nightmare.