This is a sample project to demonstrate how to use a "multi-environment" configuration setup for Scala with TypeSafe’s Config library.
See this Stack Overflow thread for more info.
-
the PROD configuration (note that the DEV is in included, so you only have to override what you want)
The DEV environment is the default one, just start an SBT session and run
the main program.
Simply specify the TypeSafe configuration file to use by passing the config.resource
system property (documented here).
This can be done either by passing the system property when starting the SBT session sbt -Dconfig.resource=prod.conf
or by editing the build.sbt
file and adding/uncommenting these lines:
fork := true javaOptions := Seq("-Dconfig.resource=prod.conf")