title: How to send the value of a variable from Node.js to the browser?
body: <p>I don't understand why I can't get the value of "i" in the browser.
  I got this Erreur 101 (net::ERR_CONNECTION_RESET) </p>
  
  <pre><code>var http = require('http');
  var i=0;
  
  http.createServer(function (req, res) {
      i++;
      res.writeHeader(200, {'Content-Type': 'text/plain'});
      res.write(i);
      res.end();
  }).listen(80, "127.0.0.1");
  </code></pre>
  
  <p>But it does work if :</p>
  
  <pre><code>res.write("i =" + i);
  </code></pre>
  
  <p>Thank you</p>