Skip to content

Instantly share code, notes, and snippets.

@caesaneer
Created August 13, 2019 19:17
Show Gist options
  • Save caesaneer/af930e1576290581b8968e7eda16a0ab to your computer and use it in GitHub Desktop.
Save caesaneer/af930e1576290581b8968e7eda16a0ab to your computer and use it in GitHub Desktop.
Part 1
package ktor.benchmark
/* ktlint-disable no-wildcard-imports */
import io.ktor.application.*
import io.ktor.response.*
import io.ktor.request.*
import io.ktor.routing.*
import io.ktor.http.*
import io.ktor.locations.*
/* ktlint-enable no-wildcard-imports */
fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)
@Suppress("unused") // Referenced in application.conf
fun Application.module() {
install(Locations)
routing {
get("/") {
call.respondText("", contentType = ContentType.Text.Plain, status = HttpStatusCode.OK)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment