getting post parameters from expessjs
This is pretty straight forward. If you're using express 4.16, all you need to do is :-
app.use(express.json());
Then somewhere in your code :-
// create user
router.post('/create', (req: Request, res: Response) => {
console.log(req.body);
// Greet the given name
res.send(`create`);
});
Comments