Db singleton

This commit is contained in:
thosakwe 2016-12-24 13:33:04 -05:00
parent 018e1b70bb
commit e9601def46

View file

@ -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