When your Lift application runs it does so with a specific “run mode”. A run mode can be used to change the behaviour of your application in different environments, e.g., development v. production.
There are six run modes:
The default run mode is development.
This wiki article outlines the differences between the different run modes, and shows how to set and use the run mode.
The run mode is controlled via the run.mode system property, and so can be set via a JVM parameter: -Drun.mode=production (for example)
Props.mode returns RunMode enumeration value
You can use this value if you need to change the behaviour of your application in different run modes, e.g.,:
Props.mode match {
case Props.RunModes.Test => // do what you need to do in test mode
case _ => otherwise...
}The run mode can be used to select a properties file (e.g., for logging control). See Logging for an example.
The following sections details the differences between run modes.
Production, Staging and Pilot are all considered to be production-level deployments, and as such have similar differences: