get data from post express code example
Example 1: express receive post data
const { id } = req.body;
Example 2: get post request content express
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
app.post('/', (req, res) => {
console.log('Got body:', req.body);
res.sendStatus(200);
});
app.listen(8080, () => console.log(`Started server at http://localhost:8080!`));