Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request - Example #16

Open
astrotars opened this issue Jan 8, 2019 · 3 comments
Open

Request - Example #16

astrotars opened this issue Jan 8, 2019 · 3 comments

Comments

@astrotars
Copy link

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.

@payamomrani
Copy link

Hi

`
req.db.collection("users").find().toArray(function(err, getUsers){
console.log(getUsers)
});

`

@vladi-strilets
Copy link

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.

@michel-fresh
Copy link

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... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants