How to use the backend-js.setModelController function in backend-js

To help you get started, we’ve selected a few backend-js 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 QuaNode / beamjs / index.js View on Github external
dbType: arguments[0],
        dbURI: arguments[1],
        dbName: arguments[2]
    };
    if (started || !options) return backend;
    if (!ModelControllerPath[options.type]) throw new Error('Invalid database type.');
    started = true;
    var ModelController = require(ModelControllerPath[options.type]);
    module.exports.ComparisonOperators = ModelController.ComparisonOperators;
    module.exports.LogicalOperators = ModelController.LogicalOperators;
    module.exports.ComputationOperators = ModelController.ComputationOperators;
    backend.setComparisonOperators(ModelController.ComparisonOperators);
    backend.setLogicalOperators(ModelController.LogicalOperators);
    backend.setComputationOperators(ModelController.ComputationOperators);
    backend.setModelController(ModelController.getModelControllerObject(options, function () {

        // if (!error) {

        // } else {

        // }
    }), path);
    return backend;
};

backend-js

Backend-js is a layer built above expressjs to enable behaviours framework for nodejs applications.

MIT
Latest version published 2 months ago

Package Health Score

57 / 100
Full package analysis