Well, this might be a stupid question, but i'm as n00b as i can be, regarding node.
I set up a server, with the code we can find in any node presentation or tutorial...
var http = require('http');
var server = http.createServer(function(req, res){
console.log('connection from: ' res.socket.remoteAddress);
res.writeHead(200, ['Content-Type', 'text/plain']);
res.write('Hello ');
res.end('World');
});
server.listen('8080');
My question is, why does my server logs my message twice for every request i make from the browser?
Your browser is requesting an img to use in the upper corner favicon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With