-
Notifications
You must be signed in to change notification settings - Fork 5
Core API: Database
Michael Matveev edited this page Aug 30, 2017
·
2 revisions
Used for Database connection.
constructor(app, mongo, _session)
- app: express instance
- mongo: MongoDB configuration (pass corresponding config.js section here)
- session: Session configuration (pass corresponding config.js section here)
Important: you don't need to initialize MongoDB object in your module, you can use app.get('db')
instead to use a pre-configured object.
get()
- Get the MongoDB object instance (the native driver is used)