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!

Related Posts:

  • Play Framework InstallationInstalling Play Framework:The following are the steps to install a play framework:Step 1: In order to run Play framework , we need JAVA 6 or higher versions. To test in your system java is installed or not, use the follo… Read More
  • Play Application StructureThe Structure of a Play Application:The structure of a Play Application is very similar to a other MVC application. There are Models, Views and Controllers folder under the app directory.  In addition to app directory it… Read More
  • About Play FrameworkAbout Play Framework:Play is an open source modern web application framework for writing scalable web applications. It is written in both Scala and Java languages.Play was created by software developer Guillaume Bort, wh… Read More
  • Java Frameworks PostsJava Frameworks Posts coming soon....… Read More
  • First application using Play FrameworkFirst application using Play Framework:Before going to implement the First play application, we need to know some thing about activator and it's commands:Activator:  Typesafe Activator is a browser based or command … Read More

0 comments: