How to change the default port from 9000 to 9001 in Play 2.5.9?
Tried following steps
But this works activator run -Dhttp.port=9001 -Dhttp.address=127.0.0.1
Can we change it from application.conf instead of specifying port from command line?
In a way, no you can not add HTTP server setting in application.conf
in reload mode (activator run
).
In run
mode by the time the play server starts, your application.conf
is not resolved yet, but if you use state
it works fine.
If you want to avoid providing port everytime you run the command, you could add it in build.sbt
as following.
PlayKeys.devSettings := Seq("play.server.http.port" -> "9001")
It is explained here