mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
14 lines
273 B
JavaScript
14 lines
273 B
JavaScript
module.exports = {
|
|
init: function () {
|
|
return new Promise((resolve, reject) => {
|
|
MongoClient.connect(config.mongodb, (err, db) => {
|
|
if (err) {
|
|
return reject(err);
|
|
}
|
|
this.db = db;
|
|
resolve(this);
|
|
});
|
|
});
|
|
}
|
|
};
|