Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
RED.nodes.registerType("mongodb", register, {
credentials: {
hosts: { type: "text" },
user: { type: "text" },
password: { type: "text" },
database: { type: "text" },
replicaSet:{ type: "text" },
ssl: { type: "text" },
connectionString : { type: "text" }
}
});
dbRegistry.register(MongoDBManager);
}
const register = function(config) {
RED.nodes.createNode(this, config);
this.xlsx = config.xlsx;
let dbPath = helper.resolve(config.path || '{cwd}/data/database.db', undefined, '');
this.path = dbPath;
this.databaseManager = new NeDBManager(RED, this);
this.on('close', (cb) => { this.databaseManager.end(cb); });
}
RED.nodes.registerType("nedb", register, {});
dbRegistry.register(NeDBManager);
}