Skip to content

A sample project to demonstrate how to use a "multi-environment" configuration setup for Scala with TypeSafe's Config library

License

Notifications You must be signed in to change notification settings

ozeebee/test-scala-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A sample project to demonstrate how to use a "multi-environment" configuration setup for Scala with TypeSafe's Config library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages