title: node - what's wrong with my app?
body: <p>I've got httpd running on port 80 and I'm trying to bind a node app to port 8080.</p>
  
  <p>Here it is:</p>
  
  <pre><code>var server = require('http').createServer(function(req, res){
  
      res.writeHead(200, {'Content-Type': 'text/plain'});
      res.end('Hello World\n');
  });
  server.listen(8080);
  </code></pre>
  
  <p>Obviously have run it from ssh command line via </p>
  
  <pre><code>node myApp.js
  </code></pre>
  
  <p>But whenever I type "http://<em>my-domain</em>:8080/" in the browser it just hangs and gives me nothing..</p>
  
  <p>I've tried a range of different ports and listening on hostname 0.0.0.0, all giving the same result.</p>
  
  <p>Have run netstat as comments suggested and results is : </p>
  
  <pre><code>tcp        0      0 0.0.0.0:8080               0.0.0.0:*                   LISTEN      3894/node           
  </code></pre>
  
  <p>I'm using centOS on nan unmanaged VPS!</p>
  
  <p>EDIT: Looks like its a firewall issue, could someone point me in the right direction as to how to configure the firewalls for a CentOS VPS.. ?</p>