Search code examples
scalaplayframeworkhocon

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?


Solution

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

    Play docs explain it very nicely.