Accessing locally stored meteor db from node js


#1

If I would access meteor database that is stored locally, how would I refactor the 2nd line of the following code?

Namely, I mean the part localhost:27017

var MongoClient = require('mongodb').MongoClient;

MongoClient.connect('mongodb://localhost:27017/meteor', function(err, db) {
    if(err) throw err;

   // some code

        db.close();
    });
});

Please let me know, if there any parts needs to be refactored.


#2

It seems it’s localhost:3001