How to run warbler (jruby on rails) on different port rather than 8080

199 views Asked by At

I created a war file named my_sample.war and run java -jar my_sample.war . It runs at port 8080 as default value. What do I do to change it to port 3000. Thanks!

1

There are 1 answers

0
Nils Landt On BEST ANSWER

You should be able to pass the port to the java invocation like so:

java -Dwarbler.port=3000 -jar my_sample.war

Alternatively, setting the environment variable PORT should work:

PORT=3000 java -jar my_sample.war