pakai buku telaah
atau buku kompas book.Q:
Unable to connect to local MongoDb with mongoose
I've downloaded mongoose to my computer from It comes with a folder named 'database' containing a database named 'test'. It is supposed to use the database located in the folder ~/xampp/htdocs/test/ but I can't seem to connect to it using mongoose. I'm using the following code:
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
mongoose.connection.on('open', function() {
console.log("Connected to mongoose");
});
But it gives me the following error:
[Sat, 25 Nov 2013 16:31:27 GMT]
Related links:
Комментарии