I am building an application on ExpressJS (similar to a blog). I am using mongoose for working with MongoDB.
I came to the point when I had to choose between various ACL modules, and decided to go with
node_acl. What confuses me is that it is using mongodb modules instead of mongoose.
According to the docs on the ACL GitHub it has to be used this way:
// Or Using the mongodb backend
acl = new acl(new acl.mongodbBackend(dbInstance, prefix));
Off the top of my head, I think you are looking for this:
Example (not tested):
var mongoose = require('mongoose'), acl = require('acl'); acl = new acl(new acl.mongodbBackend(mongoose.connection.db, 'acl_'));
(This is of course assuming you have initialized Mongoose elsewhere with mongoose.connect().)