node.js - Deploying a TCP server to Heroku -


i have tcp server coded in node.js. i'd put on heroku because it's free service , don't need more free plan offers.

now, know little inner workings of heroku , i'm pretty new whole thing have few questions.

firstly, possible deploy tcp (non-web) server? i've read heroku doesn't node.js's net because doesn't support websockets , should use socket.io.

so i've switched server socket.io. think. because code more or less looks same. i've done well: https://devcenter.heroku.com/articles/using-socket-io-with-node-js-on-heroku

what put in procfile instead of "web"? also, when tried deploy have, logs said application failed bind $port. what's $port? , how change port want?

in fact, if don't change it, how know application can connect server?

heroku doesn't support generic tcp server should able functionality want socket.io.

you need put web in procfile. that's lets heroku bind external connection port 80 local port web traffic arrive you. find port looking @ environment variable $port. more info, examples, here: https://devcenter.heroku.com/articles/nodejs


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -