From e9601def4604393b569ad9bca6c125ddcfcb4656 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sat, 24 Dec 2016 13:33:04 -0500 Subject: [PATCH] Db singleton --- lib/src/config/config.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/config/config.dart b/lib/src/config/config.dart index dfb658ec..676fcf17 100644 --- a/lib/src/config/config.dart +++ b/lib/src/config/config.dart @@ -11,6 +11,7 @@ import 'plugins/plugins.dart' as plugins; configureServer(Angel app) async { var db = new Db(app.mongo_db); await db.open(); + app.container.singleton(db); // Uncomment this to enable session synchronization across instances. // This will add the overhead of querying a database at the beginning