When this code is run, i is incremented by two every time and I can\'t pinpoint in the documentation or otherwise why this would be the case. I\'d expect the in
i
console.log(req.url);
You will notice the urls are / and /favicon.ico
/
/favicon.ico
Browsers like making requests to favicon.ico for you. That's why you get 2 requests.