Skip to content

Instantly share code, notes, and snippets.

@rpiotrow
Created August 26, 2019 07:56
Show Gist options
  • Save rpiotrow/51b0883feec559b2bacfcee7a2ce73a5 to your computer and use it in GitHub Desktop.
Save rpiotrow/51b0883feec559b2bacfcee7a2ce73a5 to your computer and use it in GitHub Desktop.
fun main(args: Array<String>) {
val repository: EmployeeRepository<ForIO> = IOEmployeeRepository()
val server = embeddedServer(Netty, port = 8080) {
configureJsonSerialization()
install(Routing) {
get("/employees") {
call.respond(repository.findAll())
}
}
}
server.start(wait = true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment