adonis-odm
Version:
A comprehensive MongoDB ODM for AdonisJS with Lucid-style API, type-safe relationships, embedded documents, and transaction support
20 lines (19 loc) • 518 B
JavaScript
/*
* adonis-odm
*
* (c) AdonisJS MongoDB ODM
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
import app from '@adonisjs/core/services/app';
import { MongoDatabaseManager } from '../src/database_manager.js';
let db;
/**
* Returns a singleton instance of the MongoDatabaseManager class from the
* container
*/
await app.booted(async () => {
db = await app.container.make(MongoDatabaseManager);
});
export { db as default };