Node.js double console.log output
问题 I'm learning Node.js and I'd like to understand the "why" when code spits out duplicated console.log outputs but only a single response.write outputs. Heres my simple code example: var http = require('http'); http.createServer(function(request, response){ response.writeHead(200, {'Content-type': 'text/plain'}); console.log('hello 1'); response.write('Hello world'); console.log('hello 2'); response.end(); }).listen(8000); And on my console/terminal I get: hello 1 hello 2 hello 1 hello 2 Thanks