$ sbt -Dredis:6379=propset run
[info] Set current project to test (in build file:/Users/toby/asldifjasklfjsd/)
[info] Running Main
hello world
propset
[success] Total time: 1 s, completed May 19, 2016 1:42:01 PM
Created
May 19, 2016 17:45
-
-
Save tobym/35d0fe799a520122b98e9eebfda266aa 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
name := "test" | |
scalaVersion := "2.11.7" | |
libraryDependencies ++= Seq( | |
"com.typesafe" % "config" % "1.3.0" | |
) |
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
redis { | |
host = "default" | |
host = ${?REDIS_HOST} | |
host = ${"redis:6379"} | |
port = ${?REDIS_PORT} | |
port = 6379 | |
pool { | |
max_connections = 10 | |
max_connections = ${?REDIS_POOL_MAX_CONNECTIONS} | |
} | |
} |
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 Main extends App { | |
println("hello world") | |
val c = com.typesafe.config.ConfigFactory.load() | |
println(c.getString("redis.host")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment