Solution | deprecated bodyParser: use individual json/urlencoded middlewares

Error:
body-parser deprecated bodyParser: use individual json/urlencoded middlewares node_modulesexpresslibrouterlayer.js:95:5
This error shows up while compiling an App using app.use(bodyParser.json());

Cause: Express v4+ has deprecated bodyParser() middleware. https://github.com/expressjs/body-parser/commit/b7420f8dc5c8b17a277c9e50d72bbaf3086a3900

Solution: You now need to call the methods separately: app.use(bodyParser.json());