I am new to heroku and i have deployed a meteorjs application on heroku. My Meteorjs application is a webapplication, so after the build is done it runs on heroku on port 80. But simultaneously i also want to listen on a port eg:4000 or any so that i can catch my webhook events fired by any third party i want to listen to. On my local machine it runs perfectly with webapp running on a port and listener running on another, but on heroku after i deploy its just the webapp which runs and listener doesn't listen. Can anybody help me or guide me. Any new solutions are also welcome..
In my server/main.js i have made a bot instance of facebook-bot-messenger and below is the code to start the listener
bot.listen(4000);
In my client/main.html i have the html code which is just hello world
On local machine when i visit http://localhost:3000 i can see helloworld and app is also listening on port 4000.
On heroku when i visit https://appname.herokuapp.com i see helloworld . In this case the port is 80 which is fine, but the bot is not listening as any post calls i make on https://appname.heroku.com on port 4000 doesn't respond.