Skip to content

Instantly share code, notes, and snippets.

@nphausg
Created October 21, 2021 17:35
Show Gist options
  • Select an option

  • Save nphausg/3e9b7b31f80350c9561515278d9da039 to your computer and use it in GitHub Desktop.

Select an option

Save nphausg/3e9b7b31f80350c9561515278d9da039 to your computer and use it in GitHub Desktop.
companion object {
private const val PORT = 5001
}
private val server by lazy {
embeddedServer(Netty, PORT, watchPaths = emptyList()) {
install(WebSockets)
install(CallLogging)
routing {
get("/") {
call.respondText(
text = "Hello!! You are here in ${Build.MODEL}",
contentType = ContentType.Text.Plain
)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment