Book Image

Mastering play framework for scala

By : Shiti Saxena
Book Image

Mastering play framework for scala

By: Shiti Saxena

Overview of this book

Table of Contents (21 chapters)
Mastering Play Framework for Scala
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with Play
Index

Deploying a Play application


A Play Framework provides commands to package and deploy Play applications in production.

The run command, which we used earlier, starts the application in DEV mode and watches the code for changes. When there is a change in the code, the application is recompiled and reloaded. Being watchful is handy during development, but is an unnecessary overhead in production. Also, the default error pages shown in PROD mode are different from the ones shown in DEV mode, that is, they have less information about the errors that are occurring (for security reasons).

Let's look at the different ways in which we can deploy an application in production.

Using the start command

To start an application in PROD mode, we can use the start command:

[PlayScala] $ start
[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 24353
[info] play - Application started (Prod...