I am trying to deploy nodejs lite-server on Heroku. I am able to run the server fine locally, but fails on deployment with this error:
Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
The basic problem is I am not sure how to allow Heroku to set the port. They do this dynamically (I only know how to do it statically). So I need to set an environmental variable so the server can set the correct port. How can I do this using lite-server?
This problem has been address for different server setups:
To configure http server port for Heroku
Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
To configure Express server port for Heroku