I'm a complete novice in node.js and just have started working on it. I was following few tutorials online on 'mongoDB' and 'monk' and I came across this syntax var db = require('monk')('localhost:27017/test')
.
Now, I know we're requiring the 'monk' package and connecting to the specified URL. However, the thing which I'm unable to understand is that how are we passing the URL in the second pair of parenthesis. What exactly does this second pair of parenthesis mean? Is it a function, object, callback function or what?
I looked over on the web for the same but didn't get much help. They've not explained this anywhere. Need some help to understand it.