1// If you are using Express 4.16+ you don't have to import body-parser anymore.
2// You can do it just like this:
3
4app.use(express.urlencoded({extended: true}));
5app.use(express.json()) // To parse the incoming requests with JSON payloads
1const express = require('express');
2
3app.use(express.urlencoded({ extended: true }));
4app.use(express.json());
5
1// bodyParsor is deprecated, most of the functionality is included in express
2// on epxress 4.16 and above just replace bodyParser with express
3// e.g
4const express = require('express')
5app.use(express.urlencoded({extended: true}));