I have made an app which is exposing some REST api's( implemented using Jersey JAX-RS). Now when I deploy 'war' on heroku, the API's are not accessibe.
I've changed http://localhost:8080/myProjectNameInEclipse/webapi/ * to --> http://myAppNameInHeroku.herokuapp.com/myProjectNameInEclipse/webapi/ *
but after this the URL's are no longer accessible. Can anybody guide me on renaming URL's while deploying on server (especially on Heroku)
The web process must listen on one and only one port. The port must be the one specified in the $PORT variable. If your process listens on other ports, it will be shut down by Heroku.
Adding to the answer above. You need a Procfile to indicate the $PORT
variable
web: java $JAVA_OPTS -jar target/dependency/jetty-runner.jar --port $PORT target/*.war
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.