title: Use a node app from another device locally
body: <p>I have a server (<code>10.0.0.12</code>) and my laptop (<code>10.0.0.2</code>) on a local network. </p>
  
  <p>When I run <code>curl http://10.0.0.2:3000</code> on the server, it works fine. When I run <code>curl http://10.0.0.12:3000</code> on my laptop, it doesn't work saying site is unavailable.</p>
  
  <p>I am able to ping and ssh into the server from my laptop.</p>
  
  <p>Here is my code to finish the connection:</p>
  
  <pre><code>app.set('port', (3000));
  
  app.listen(app.get('port'), function(){
      console.log("Node app running on localhost:" + app.get('port'));
  }
  </code></pre>
  
  <p>I've tried passing in an ip address to the <code>listen()</code> function, but made no difference. I tried passing in <code>10.0.0.12</code> (the ip address of the server), <code>127.0.0.1</code>, and <code>0.0.0.0</code> all with the same result.</p>
  
  <p>How can I host my node app on a local network and have everyone who is on the local network be able to access it through the browser?</p>
  
  <p>EDIT: I'm running on CentOS 7.</p>
  
  <p>EDIT2: When I run <code>netstat -lnt</code>, it says this:</p>
  
  <p><code>tcp      0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN</code></p>