【发布时间】:2019-07-01 04:36:42
【问题描述】:
我是 Node.js 的新手
req.end 在 Node.js 中的用途是什么。我使用它,但是它打印了两次
app.use('/',function(req,res){
res.send("hello world"); //send to browser
console.log("by"); //print in console
req.end; //req is end here
}).listen(3000);
【问题讨论】:
-
req.end或res.end? -
我只使用req.end
-
您使用 Express 吗?没有像req.end这样的功能
-
了解更多 res.send 和 res.end stackoverflow.com/questions/29555290/…
-
更改为 res.end()。但它仍然可以在控制台中显示,如 G:\login & register>node demo i am the middle hello world i am the middle hello world
标签: node.js