Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between using play start and play run?

I am using play framework 2.0.4,

I noticed that in the project folder, if I used play start, the server responses faster than server started via play run. However, user can not access static resources under public folder in the server started using start command, so I am wondering what's the start default configuration that changing the root directory or do I need to change routes which originally defined as:

# Map static resources from the /public folder to the /assets URL path
GET     /assets/*file               controllers.Assets.at(path="/public", file)
HEAD    /assets/*file               controllers.Assets.at(path="/public", file)
like image 313
monica Avatar asked Apr 30 '13 02:04

monica


1 Answers

The play start command should be executed when you want to deploy your application on production mode. It's response faster, because the auto-reloading-class and other development-supporting-features are disabled by default.

Unlike play start command, the play run command is best executed on development mode because it will enable all development-supporting-feature like auto-reloading, eBean DDL generation, and so-on.

Actually, if you have a javascript file on public/javascripts/jquery-1.9.0.min.js. You still can access to url http://yourdomain/assets/javascripts/jquery-1.9.0.min.js even if you use play start or play run because the public/* files are mapped to /assets/*

And to be noticed that the play start command is doing the process in background, while play run not.

like image 92
Wayan Wiprayoga Avatar answered Sep 28 '22 05:09

Wayan Wiprayoga