Setting the port for node.js server on Heroku February 19, 2023 by Tarik You can’t. Heroku sets the PORT variable that you are supposed to bind, and listens on tcp/80.