Created
October 21, 2021 17:35
-
-
Save nphausg/3e9b7b31f80350c9561515278d9da039 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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