Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

play framework production version includes source codes

I can see source code in production version of play framework based applicaton? Do I need it? Can it be removed in production version?

like image 734
Pavel Avatar asked May 27 '11 15:05

Pavel


2 Answers

No you don't need it, once the source has been compiled behind the scenes when the application first starts up in production mode. If you don't want to keep the source code on your production environment, make sure you use the precompile option

play precompile <appname>

To make sure that your application code is compiled before you distribute. The app can then be distributed without the source code. Obviously don't delete the source code unless you have it backed up in source control or other location!

like image 131
Codemwnci Avatar answered Sep 28 '22 18:09

Codemwnci


Don't forget to start your application using the -Dprecompiled=true flag to avoid unnecessary code changes detection.

play start myApp -Dprecompiled=true

See http://www.playframework.org/documentation/1.2/releasenotes-1.1

like image 37
Joel Grenon Avatar answered Sep 28 '22 16:09

Joel Grenon