const bodyParser = require('body-parser'); app.use(bodyParser.json()); app.use(bodyParser.urlencoded()); // in latest body-parser use like below. app.use(bodyParser.urlencoded({ extended: true }));