How to connect to monogodb using monk?

Viewed 7956

I am building a nodejs app using expressjs framework. I would like to ask how do we connect to mongodb using monk? i found this code online however it seems that we do not need to specify username and password. why is that so?

var mongo = require('mongodb');
var monk = require('monk');
var db = monk('localhost:27017/nodetest1');

Appreciate any advice.

3 Answers
Related