Sunday, April 20, 2014

How do I change the default port (9000) that Play uses ?

http://stackoverflow.com/questions/8205067/how-do-i-change-the-default-port-9000-that-play-uses-when-i-execute-the-run


Play 1.x

Change the http.port value in the conf/application.conf file or pass it command line:
play run --http.port=8080

Play 2.x - Dev Mode

For browser-reload mode:
play "run 8080"
For continuous-reload mode:
play "~run 8080"

Play 2.x - Debug Mode

To run in debug mode with the http listener on port 8080, run:
play debug "run 8080"

Play 2.x - Prod Mode

Start in Prod mode:
play "start -Dhttp.port=8080"

Play 2.x - Staged Distribution

Create a staged distribution:
play stage
For Play 2.0.x and 2.1.x use the target/start script (Unix Only):
target/start -Dhttp.port=8080
For Play 2.2.x use the appropriate start script in the target/universal/stage/bin directory:
target/universal/stage/bin/[appname] -Dhttp.port=8080
With Play 2.2.x on Windows:
target\universal\stage\bin\[appname].bat -Dhttp.port=8080

Play 2.x - Zip Distribution

To create a zip distribution:
play dist
For Play 2.0.x and 2.1.x use the start script (Unix Only) in the extracted zip:
start -Dhttp.port=8080
For Play 2.2.x use the appropriate script in the [appname]-[version]/bin directory:
[appname]-[version]/bin/[appname] -Dhttp.port=8080
With Play 2.2.x on Windows:
[appname]-[version]\bin\[appname].bat -Dhttp.port=8080

No comments: