我需要在注册页面中访问此用户名。以下代码无效。你能说明需要做什么吗?
app.post('/login', function (req, res) {
if(req.body.username === "ms" || req.body.password === "ms") {
sess=req.session;
req.session.password = req.body.password;
req.session.username = req.body.username;
res.render('/registration.html', { username:req.user.username });
}
});