express-mongo-db
express-mongo-db copied to clipboard
Request - Example
Can you please provide an example of how to call req.db properly? (e.g. req.db.collection.find({})
); Everything I've tried returns an error that find is not a function.
Hi
` req.db.collection("users").find().toArray(function(err, getUsers){ console.log(getUsers) });
`
Hi, in my case req.db returns the default database "admin". How can I specify the name of the database I want to be used? Thanks.
Hi, in my case req.db returns the default database "admin". How can I specify the name of the database I want to be used? Thanks.
Having the same problem as above even though I have specified a default db in my connection string... :(