1

I am trying to run ratpack (https://github.com/pledbrook/lazybones/tree/master/src/templates/ratpack)

using "gradlew run" - this uses a default port, is there a way to set the port on the command line that will be used for http?

Something like gradlew run -Dhttp.port=8080 or similar?

Michael Neale
  • 19,248
  • 19
  • 77
  • 109

2 Answers2

7

You need to configure it at the build level…

run {
  jvmArgs "-Dratpack.port=8080"
}
Luke Daley
  • 571
  • 3
  • 6
  • Yes I saw that, I should have been clearer: is there a way the number can come from the environment/system properties? rather than hard code it? – Michael Neale May 21 '13 at 01:39
1

Try, when executing the application:

RATPACK_SERVER__PORT=5051 ./gradlew run
D.F.
  • 185
  • 1
  • 6