Files
2022-10-09 17:21:02 +02:00

15 lines
309 B
JavaScript

module.exports = {
init: function () {
var _this = this;
return new Promise(function (resolve, reject) {
MongoClient.connect(config.mongodb, function (err, db) {
if (err) {
return reject(err);
}
_this.db = db;
resolve(_this);
});
});
}
};