Postman can't connect to mongoDB

Hi guys,

I’ve been debugging a connection problem for a few days when running the POST request. I am using Node.js and mongoDB, mongoose. I’ve checked the DB is able to be connected in Node.js. But in postman, an error message comes up in console :

Error: socket hang up

POST /products HTTP/1.1

Content-Type: application/json

Is there anyone can help me with this problem? Thank you!!

Hi @CherylJello, welcome to the community! :wave:

Can you share more insights into the API that you’ve designed?
Can you verify that you’re hitting the request with the correct body etc?
Check the endpoint etc. too!

You can go through the docs regarding how you can debug in Postman.