DEV Community

Discussion on: Authentication in Node.js with MongoDB, bcrypt, and JWT web Tokens with cookiesΒ πŸͺ.

Collapse
 
drsimplegraffiti profile image
Abayomi Ogunnusi

Nice post πŸ‘πŸ‘...
I tend to use Express: app.use(express.json())

app.use(bodyparser.json()) outputs depreciation warnings here...just my preference though

Collapse
 
nyctonio profile image
Ritesh Kumar

Yes you are right from now i will also use the same thanks for pointing it out 🀍

Collapse
 
maswerdna profile image
Samson Andrew

You're right.
The recommended way is to call the methods directly on the express object.

Because...
In the latest version of Express, some bodyParser's methods have been added natively. That's why you don't have to install or require bodyParser again.