Reputation: 4071
How can I run Play! in production mode, so that it doesn't print source code to the browser window in case of an exception?
Upvotes: 22
Views: 19283
Reputation: 23
If you are using SBT you can run it in production mode with the following command
$ sbt runProd
Upvotes: 1
Reputation: 6547
While being in the sbt console, you can also run your app in Prod mode with
[my-first-app] $ testProd
Also useful is to use this command to prevent sbt exiting when pressing CTRL
+D
[my-first-app] $ testProd --no-exit-sbt
In Play 2.6, testProd
was renamed to runProd
:
[my-first-app] $ runProd
Upvotes: 17
Reputation: 7877
There are several methods, the easiest way is to run play start
instead of play run
.
You can find more information on the documentation: Starting your application in production mode
Upvotes: 23