Answer the question
In order to leave comments, you need to log in
Submitting a form to the server?
How to send and receive a simple form correctly:
<form name="test" method="post" action="/comment">
<p><b>Ваше имя:</b><br>
<input type="text" size="40">
</p>
<input type="submit" value="Отправить">
</form>
app.post('/comment',jsonParser,function (req,res,next) {
console.log(req.body.email)
});
Answer the question
In order to leave comments, you need to log in
You need to remove the jsonParser middleware and return a response
app.post('/comment',function (req,res,next) {
console.log(req.body.email);
res.send('Hello World!');
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question