Joakim Forslund
10/18/2022, 7:36 AMJoakim Forslund
10/18/2022, 7:40 AMJoakim Forslund
10/18/2022, 7:42 AMJoakim Forslund
10/18/2022, 7:44 AMJoakim Forslund
10/18/2022, 7:50 AMJoakim Forslund
10/18/2022, 12:22 PMdata class Simple(val name:String, val nr:Int, val lnr2:Long, val status:Boolean)
fun main() {
println("Trying to start server")
val simple = Simple("Ape", 0, 1L, true)
embeddedServer(CIO, port = 7878) {
install(ContentNegotiation) {
json(Json {
prettyPrint = true
isLenient = true
})
}
routing {
get("/status") {
call.respond(HttpStatusCode.OK, simple)
}
}
}.start(wait = true)
}
Is the code