Skip to content

Instantly share code, notes, and snippets.

@jto
Created May 23, 2013 15:27
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 jto/5636921 to your computer and use it in GitHub Desktop.
Save jto/5636921 to your computer and use it in GitHub Desktop.
val server = new NettyServer(
new StaticApplication(applicationPath),
Option(System.getProperty("http.port")).fold(Option(9000))(p => if (p == "disabled") Option.empty[Int] else Option(Integer.parseInt(p))),
Option(System.getProperty("https.port")).map(Integer.parseInt(_)),
Option(System.getProperty("http.address")).getOrElse("0.0.0.0")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment