f40ef6b7c0
Align Cloudly with the current typedserver, smartconfig, smartstate, and Docker tooling releases so builds and Docker output stay compatible with the upgraded stack.
24 lines
553 B
TypeScript
24 lines
553 B
TypeScript
import * as plugins from '../plugins.js';
|
|
import { Cloudly } from '../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();
|
|
}
|
|
}
|