Configuring for production
The Play Framework understands that applications may require changes in configuration prior to deployment in production. To simplify deploying, the command to deploy the application also accepts application-level configurations as arguments:
[PlayScala] $ start -Dapplication.secret=S3CR3T [info] Wrote /PlayScala/target/scala-2.10/playscala_2.10-1.0.pom (Starting server. Type Ctrl+D to exit logs, the server will remain in background) Play server process ID is 14904
Let's change the application's HTTP port as follows:
#setting http port to 1234 [PlayScala] $ start -Dhttp.port=1234
In some projects, the production and development configuration are maintained in two separate files. We could either pass one or more configurations or a different file altogether. There are three ways of specifying a configuration file explicitly. It can be achieved by using one of the following options:
config.resource
: This option is used when the file is within the class...