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

Question

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

Answers 1
Added at 2016-12-25 06:12
Tags
Question

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!

Answers
nr: #1 dodano: 2016-12-25 13:12

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
Source Show
◀ Wstecz