Reactormonk Reactormonk - 27 days ago 11
Scala Question

In a play framework config (hocon), how do I use an environment variable or a default?

In

application.conf
, how do I use a environment variable to set a value, or a default if said environment variable is empty?

Answer
my.value="default"
my.value=${?SOME_ENV_VARIABLE}

Play docs explain it very nicely.

Comments