title: I don't have to specify a port for heroku for my socket.io app?
body: <p>I've successfully made a test chat app and I've gotten a node js server with socket.io running on heroku.  On my local computer I have to specify the port number of localhost on the client side to the port that the server has set up.  However, when I run my server code on heroku.  Removing the server </p>
  
  <p>I'm using the process.env.PORT variable since heroku sets that up:</p>
  
  <pre><code>var port = process.env.PORT || 3000;
  http.listen(port, function(){
    console.log('listening on *:' + port);
  });
  </code></pre>
  
  <p>Naturally I find the port number that the app is running on place it in the url</p>
  
  <pre><code>var socket = io('https://xxxx.herokuapp.com:1111');
  </code></pre>
  
  <p>However this gives me an "net::ERR_CONNECTION_REFUSED".</p>
  
  <p>I got it to work by removing the port nubmer after the url (in this example :1111).  I'm wondering why this is working since most of the tutorials and articles online have it specifying the port and why my local computer needs the port to work as well.</p>