score:0

I believe the usual syntax for an express post route is as follows:

    router.post("/feedback", function(req, res){
    //grabbing the request body
    console.log(req.body);
    console.log(req.bodt);
    //posting the request
    res.json(req.body);
});

A callback function needs to be passed in and receive those request and response parameters (req, res).


Related Query

More Query from same tag