I am using PlayFramwework 2.1.1 with Scala and I have created a small test server that I run locally (play run
from console). If I change something while the server is running, these changes won't be recompiled and "re-deployed" until the first request hits (curl "http://localhost:9000"
, for example).
Is there a way to have the server refresh upon save, like on Tomcat? Thanks.
Yep. Start it with play ~run
. (notice the tilde.) That way, files will automatically be recompiled after saving them.
That's common usage case
play run
waits for request to compile changes (so compiles at the first request right after changes)
play ~run
after change saving
Keep in mind that goes with price increased memory and CPU consumption, so while developemnt is not always desired situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With