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!
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