Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.24 KB

README.adoc

File metadata and controls

36 lines (24 loc) · 1.24 KB

Test Scala Config

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.

Requirements

  • Scala 2.11

  • SBT 0.13

Configuration files

Running in DEV environment

The DEV environment is the default one, just start an SBT session and run the main program.

Running in PROD environment

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")