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

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm