fix(core): update
This commit is contained in:
21
ts/connector.mongodb/connector.ts
Normal file
21
ts/connector.mongodb/connector.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import * as plugins from '../cloudly.plugins.js';
|
||||
import { Cloudly } from '../cloudly.classes.cloudly.js';
|
||||
|
||||
export class MongodbConnector {
|
||||
// INSTANCE
|
||||
private cloudlyRef: Cloudly;
|
||||
public smartdataDb: plugins.smartdata.SmartdataDb;
|
||||
|
||||
constructor(cloudlyRefArg: Cloudly) {
|
||||
this.cloudlyRef = cloudlyRefArg;
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.smartdataDb = new plugins.smartdata.SmartdataDb(this.cloudlyRef.config.data.mongoDescriptor);
|
||||
await this.smartdataDb.init();
|
||||
}
|
||||
|
||||
public async stop() {
|
||||
await this.smartdataDb.close();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user