How does Node.js get the parameter < inputtype = "text" name = "" > passed like this

  node.js, question

var user = req.body.user; This is not available

Thank you, everyone. The problem has been solved. express is used.
Html changed to

<input type="text" name="user[name]">
 <input type="password" name="user[password]">

For app.js read

app.use(bodyParser.urlencoded({ extended: true }));

Then get the user object in the background as follows:

var user = req.body.user;