How to use the node-red-contrib-viseo-nosql-manager.dbRegistry.register function in node-red-contrib-viseo-nosql-manager

To help you get started, we’ve selected a few node-red-contrib-viseo-nosql-manager examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NGRP / node-red-contrib-viseo / node-red-contrib-mongodb / node-mongodb.js View on Github external
}

    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);


}
github NGRP / node-red-contrib-viseo / node-red-contrib-nedb / node-nedb.js View on Github external
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);
}