index.js
function requireModel(filePath, cb) {
        //check if file exist. if not return error
        fs.exists(filePath, function (exists) {
            if (!exists) {
                soajs.log.error('Requested Model Not Found!');
                return cb(601);
            }

            driver.model = require(filePath);
            return cb();
        });
    }
function requireModel(filePath, cb) {
        //check if file exist. if not return error
        fs.exists(filePath, function (exists) {
            if (!exists) {
                soajs.log.error('Requested Model Not Found!');
                return cb(601);
            }

            driver.model = require(filePath);
            return cb();
        });
    }
function requireModel ( filePath , cb ) { //check if file exist. if not return error fs . exists ( filePath , function ( exists ) { if ( ! exists ) { soajs . log . error ( 'Requested Model Not Found!' ) ; return cb ( 601 ) ; } driver . model = require ( filePath ) ; return cb ( ) ; } ) ; }
checks if model file exists, requires it and returns it.
@param filePath
@param cb
checks if model file exists requires it and returns it .