I know I\'m doing some very stupid and noobish, but I\'m hoping someone can help me set up a basic database connection to mongodb from node.js on a mac.
I had facing the same issue while writing a simple rest api using node.js
eventually found out it was due to wifi blockage and security reason .try once connecting it using your mobile hotspot .
if this be the reason it will get resolved immediately.