Express JS— body-parser and why may not need it | by Michael Majdanski | Medium

Express JS— body-parser and why may not need it

ExpressJS, not to be confused with Espresso (which people still pronounce incorrectly)

Node/Express

Purpose

npm install --save body-parser

app.use(bodyparser.json()); //utilizes the body-parser package

app.use(express.json()); //Used to parse JSON bodies

app.use(bodyParser.urlencoded({extended: true}));

app.use(express.urlencoded()); //Parse URL-encoded bodies

Conclusion