title: Node.js How to get the IP address of http server listening on a specific port
body: <p>I've a following very basic code of HTTP server which is listening on port 8000. How to determine the IP address of server, can it be retrieved from the 'server' variable? I am working on an application where I need to automatically send the server Info (ip,port etc..) to redis store. </p>
  
  <p>I'm new to node.js, Thanks for the help</p>
  
  <pre><code>var http = require("http");
  var server = http.createServer(function(request, response) {
    response.writeHead(200, {"Content-Type": "text/html"});
    response.write("Hello!!!");
    response.end();
  });
  </code></pre>
  
  <p> </p>
  
  <pre><code>server.listen(8000);
  console.log("Server is listening....");
  </code></pre>