I am trying to deploy my server on heroku. I got this error:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
<
You must bind to the port that Heroku assigns you as the env var $PORT, and the host 0.0.0.0. So you should change you code to include this:
public static String PORT = System.getenv("PORT");
The SERVER_URL part may be trickier. You could use 0.0.0.0, but if you truly need the publicly accessible URL, you'll need to set something like this (changing "yourappname" to your app name):
$ heroku config:set SERVER_URL="https://yourappname.herokuapp.com"
And then add the code:
public static String SERVER_URL = System.getenv("SERVER_URL");