Category Archives: nodejs

MongoDB, Node.js and admin auth

There is a big challenge to make MongoDB driver to work with Node.js, but here is an cool and working example to do that: Require: var mongodb = require(“mongodb”); //require node-mongodb-native var settings = require(‘./mconfig’); //for settings Connect to the admin database: var mongoserver = new mongodb.Server(settings.mongo_host, settings.mongo_port, {}); admindb = new mongodb.Db(‘admin’, mongoserver); Try…

Read More