title: How to get local IP address in NodeJS?
body: <p>I have a problem finding local IP address in NodeJS. The best solution I have found so far is to call the <code>os.networkInterfaces()</code> method (or <code>ifconfig</code>) and simply parse the results checking if <code>family == 'IPv4'</code> and <code>internal == true</code>. The problem is, when we have an VM installed with a virtual network interface, we get two such addresses and there is no way (or is there?) to distinguish which one is the 'real' one.</p>
  
  <p>Any idea how to do it?</p>
  
  <p>Thanks in advance</p>