title: Nodejs Server Hostname
body: <p>Ok, so it seems pretty easy in Node.js to get the hostname of the request being made to my server:</p>
  
  <pre><code>app.get('/', function(req,res){
      console.log(req.headers.host);
  });
  </code></pre>
  
  <p>Is there an easy way to determine the hostname of my actual http server? For example, my server is running at the address <code>http://localhost:3000</code> - can I programatically determine this address? I am using expressjs.</p>