I have a TCP server encoded in node.js. I would like to express this on Heroku because it is a free service and I do not need anything other than offering their free plan.
Now I know very little about the inner workings of Heroku, and I'm pretty new to this, so I have a few questions.
First, is it even possible to deploy TCP (non-web server)? I read that Heroku does not like node.js net because it does not support websites and that I have to use socket.io.
So, I switched my server to socket.io. I think. Because my code more or less looks the same. I did it too: https://devcenter.heroku.com/articles/using-socket-io-with-node-js-on-heroku
What do I insert into my Procfile instead of "web"? In addition, when I tried to deploy what I have, the logs reported that my application could not be bound to $ PORT. Which $ PORT? And how do I change it to the port I want?
Actually, if I do not change it, how do I know what it is, so my application can connect to this server?
source share