I'm following a tutorial to learn Nodejs and the framework express.js. In this tutorial, I installed a front from node and linked it to my backend. I don't edit my front because it is in my node_modules but I want to get informations from a form. I use the following code to get informations from the form :
app.post('/api/stuff', (req, res, next) => {
console.log('test');
console.log(req.body);
res.status(201).json({
message: 'Objet créé !'
});
});
When I submit data from the form, I get any return and this error message in the console :
Form submission canceled because the form is not connected
I do not understand why I don't get any data from the form.
Can someone help me please?