With the help of homebrew, I have installed MOngoDB and it is working fine for me. My both mongo and mongod are running in the background.
I've also verified that I can reach the web interface at localhost:28017.
After verifying I installed node.js and install the mongoose package. I then tried to connect using node.js app:
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
After writing the above command I get the following error:
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)
Am I missing something?