The trick with deploying your node.js/express app in Heroku
If you are working on a simple nodejs/express service and are looking to deploy to Heroku, even though the steps to deploy are really straightforward if you are using the Heroku CLI, when you first deploy your app, you will run into an issue like this.
Usually in your express code, you hard code your port number especially when you're writing a Hello World application. You mayb use a port number like 8084 or 5000. But in Heroku, you can't use the port that you want, Heroku will assign a random port for you. To use the port number that Heroku gives you, you should do the following:
Once you do this, you can deploy your app back on Heroku and it will work!
Congratulations @sharatdotinfo! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!