Db singleton
This commit is contained in:
parent
018e1b70bb
commit
e9601def46
1 changed files with 1 additions and 0 deletions
|
@ -11,6 +11,7 @@ import 'plugins/plugins.dart' as plugins;
|
||||||
configureServer(Angel app) async {
|
configureServer(Angel app) async {
|
||||||
var db = new Db(app.mongo_db);
|
var db = new Db(app.mongo_db);
|
||||||
await db.open();
|
await db.open();
|
||||||
|
app.container.singleton(db);
|
||||||
|
|
||||||
// Uncomment this to enable session synchronization across instances.
|
// Uncomment this to enable session synchronization across instances.
|
||||||
// This will add the overhead of querying a database at the beginning
|
// This will add the overhead of querying a database at the beginning
|
||||||
|
|
Loading…
Reference in a new issue