title: Node.js on MAC: Access a Node.js web server from another computer
body: <p>I built a Node.js web server on my computer, using the so-well-known-http-web-server-example of Node.js:</p>
  
  <pre><code>var http = require('http');
  
  http.createServer(function(req, res){
      res.writeHead(200, {'content-type': 'text/plain'});
      res.end('It works');
  }).listen(3000, '127.0.0.1');
  </code></pre>
  
  <p>This works (as expected) on the computer that runs the server.</p>
  
  <p>I would like to access the server from another computer, in the same LAN. Using <code>ifconfig</code> on the terminal of the computer that runs the server (Apple MacOSX), I get: <code>192.168.0.6</code>.</p>
  
  <p>So, in my other computer, I opened my browser and connected to <code>http://192.168.0.6:3000</code>, but I get:</p>
  
  <pre><code>Oops! Google Chrome could not connect to 192.168.0.6:3000
  </code></pre>
  
  <p>My final aim, is to be able to connect to the server using my smartphone.</p>
  
  <p>Any help would be welcome. Don't hesitate to ask for more details if necessary.</p>
  
  <p>Thanks in advance :)</p>