node.js beginner - why does this receive 2 responses?

前端 未结 1 618
栀梦
栀梦 2021-01-21 04:24
var http = require(\"http\");

function onRequest(request, response) {
  console.log(\"Request received.\");
  response.writeHead(200, {\"Content-Type\": \"text/plain\"}         


        
1条回答
  •  迷失自我
    2021-01-21 05:13

    It was your browser asking for favicon.ico

    0 讨论(0)
提交回复
热议问题