Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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