Created
October 9, 2016 17:10
-
-
Save cvogt/13797f084ba52b6f823b1508f980a6a6 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
object SwitchableConfig{ | |
def main(args: Array[String]): Unit = { | |
val config = System.getProperty("config") match { | |
case "test" => Config("db.test-server.com",10000) | |
case "production" => Config("db.production-server.com",12345) | |
case _ => throw new Exception("unknown config: "+config) | |
} | |
Application.run( config ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment