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)
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");
But it does work if :
res.write("i =" + i);
Thank you