Sunday, August 2, 2015

Changing the default port number(9000) of a Play Application

Changing the default port number  9000 of Play Application:

In order to change the default port number, we can do it in two ways:

Way 1: In the conf/application.conf file change the default port number value.
             http.port=2015

Way 2: Passing the port number value while running the application in command line or terminal.

Play 1.x:  

play run --http.port=2015

Play 2.x: 

activator "run 2015"  - browser-reload mode
activator "~run 2015"continuous-reload mode
activator debug "run 2015"debug mode

Reference:

  1. https://www.playframework.com/documentation/2.2.x/ProductionConfiguration
  2. https://stackoverflow.com/questions/8205067/how-do-i-change-the-default-port-9000-that-play-uses-when-i-execute-the-run?rq=1
Happy Learning!

0 comments: