I have a file database.coffee containing only two lines
mongoose = require('mongoose')
mongoose.connect 'mongodb://localhost:27017/myDatabase'
When running coffee database.coffee
I get the following output:
/SOMEPATH/node_modules/mongodb/lib/server.js:236
process.nextTick(function() { throw err; })
^
Error: connect ECONNREFUSED
at errnoException (net.js:901:11)
at Object.afterConnect [as oncomplete] (net.js:892:19)
What could be causing this error ?