mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
15 lines
309 B
JavaScript
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);
|
|
});
|
|
});
|
|
}
|
|
};
|