0

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 ?

JohnnyHK
  • 305,182
  • 66
  • 621
  • 471
user253956
  • 313
  • 6
  • 14

0 Answers0