Use either of the two:
app.use(express.json());
app.use(bodyParser.json());
Incase of the 2nd option.
npm i body-parser
const bodyParser = require("body-parser");
Use either of the two:
app.use(express.json());
app.use(bodyParser.json());
Incase of the 2nd option.
npm i body-parser
const bodyParser = require("body-parser");