feat(node): Add smartmongo and smarts3 integration in node tools

This commit is contained in:
2024-11-06 02:46:34 +01:00
parent 05a361046e
commit 649e69e1f2
6 changed files with 5339 additions and 4109 deletions

View File

@ -68,6 +68,28 @@ class TapNodeTools {
cert: pemCert,
};
}
/**
* create and return a smartmongo instance
*/
public async createSmartmongo() {
const smartmongoMod = await import('@push.rocks/smartmongo');
const smartmongoInstance = new smartmongoMod.SmartMongo();
await smartmongoInstance.start();
return smartmongoInstance;
}
/**
* create and return a smarts3 instance
*/
public async createSmarts3() {
const smarts3Mod = await import('@push.rocks/smarts3');
const smarts3Instance = new smarts3Mod.Smarts3({
cleanSlate: true,
});
await smarts3Instance.start();
return smarts3Instance;
}
}
export const tapNodeTools = new TapNodeTools();