Skip to content

Instantly share code, notes, and snippets.

@muuki88
Created July 31, 2016 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muuki88/51847793185227653c9b30c34437d7e1 to your computer and use it in GitHub Desktop.
Save muuki88/51847793185227653c9b30c34437d7e1 to your computer and use it in GitHub Desktop.
// 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