Created
November 11, 2015 09:01
-
-
Save igstan/ca5528a76a098d80f61d to your computer and use it in GitHub Desktop.
This file contains 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
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