Skip to content

Instantly share code, notes, and snippets.

@KunalChaubal
Created June 11, 2020 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KunalChaubal/70035b3c4cd3ba4f6eacc6c9e84cecde to your computer and use it in GitHub Desktop.
Save KunalChaubal/70035b3c4cd3ba4f6eacc6c9e84cecde to your computer and use it in GitHub Desktop.
fun main() {
val server = embeddedServer(Netty, port = 8080) {
routing {
helloWorld()
}
}
server.start(wait = true)
}
fun Route.helloWorld() {
get("/") {
call.respondText("Hello World!", ContentType.Text.Plain)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment