fun main() {
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.

Get Ktor
Latest release: 1.4.2
Get KtorLearn more
Latest release: 1.4.2

Why Ktor?

Lightweight

Lightweight

Use what you need. Ktor allows you to transparently configure only the functionality your project requires. No magic involved!

Extensible

Extensible

Extend what you need. With a configurable pipeline, you can create the extensions you need and place them anywhere you want.

Multiplatform

Multiplatform

Run it where you need it. Built from the ground up with Kotlin Multiplatform technology, you can deploy Ktor applications anywhere.

Asynchronous

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.


«I believe the future is bright for Ktor! It is so robust and fast to work with, and it is written in Kotlin! It has a variety of options that make it easy to develop and deploy via Gradle and Maven, which is great.»

Burak Akgün, HTG

«Ktor gave us the speed, convenience, and ease that our Kotlin developers needed on the backend.»

Tobias Marschall, Tapped