Reactormonk Reactormonk - 9 months ago 48
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 Source
my.value="default"
my.value=${?SOME_ENV_VARIABLE}

Play docs explain it very nicely.