Skip to content

Instantly share code, notes, and snippets.

@igstan
Created November 11, 2015 09:01
Show Gist options
  • Save igstan/ca5528a76a098d80f61d to your computer and use it in GitHub Desktop.
Save igstan/ca5528a76a098d80f61d to your computer and use it in GitHub Desktop.
import com.twitter.finagle.Http
import com.twitter.util.Await
import io.finch._
import io.finch.response.EncodeResponse.encodeString
import io.finch.circe._
object Main {
val hello: Endpoint[String] =
get("hello") {
Ok("Hello!")
}
def main(args: Array[String]): Unit = {
Await.ready(Http.server.serve(":8081", hello.toService))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment