У меня установлена следующая программа Nodejs
var http = require('http');
var url = require('url');
var server = http.createServer((req,res)=>{
console.log("Enter into the 3000 port");
res.end("hello world")
console.log("Enter into the 3000 port");
}).listen(3000,()=>{console.log("the server is listen to the port 3000");});
Я выполняю этот код при загрузке localhost: 3000 в браузере, и когда я написал console.log("Enter into the 3000 port");
, чтобы проверить, как выполняется внутреннее выполнение, я получилследующий вывод.ВЫХОД:
the server is listen to the port 3000
Enter into the 3000 port
Enter into the 3000 port
Enter into the 3000 port
Enter into the 3000 port
Но я написал код console.log("Enter into the 3000 port");
два раза в коде, но я не понимаю, почему он вызывался два раза по одному запросу, и когда я снова отправляю запрос, он снова показал мнекакой-то вывод может объяснить любой.