Created
July 31, 2016 12:11
-
-
Save muuki88/51847793185227653c9b30c34437d7e1 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 flaggable type class | |
import Env._ | |
// start a service in an environment with | |
// --env prod | |
val env = flag[Env]("env", Env.Local, "environment this server runs") | |
val port = flag[Int]("port", 8080, "port this server should use") | |
val server = ThriftMux.server | |
.withLabel("temperature-service") | |
.serveAndAnnounce( | |
name = s"zk!127.0.0.1!/service/${env.name}/temperature", | |
addr = s":${port()}", | |
service = finagledService | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment