Skip to content

Instantly share code, notes, and snippets.

@tobym
Created May 19, 2016 17:45
Show Gist options
  • Save tobym/35d0fe799a520122b98e9eebfda266aa to your computer and use it in GitHub Desktop.
Save tobym/35d0fe799a520122b98e9eebfda266aa to your computer and use it in GitHub Desktop.
$ 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
name := "test"
scalaVersion := "2.11.7"
libraryDependencies ++= Seq(
"com.typesafe" % "config" % "1.3.0"
)
redis {
host = "default"
host = ${?REDIS_HOST}
host = ${"redis:6379"}
port = ${?REDIS_PORT}
port = 6379
pool {
max_connections = 10
max_connections = ${?REDIS_POOL_MAX_CONNECTIONS}
}
}
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