lib/utils.js
function getConfig() {
    var fs = require('fs');
    if (fs.existsSync(controllerDir + '/conf/' + appName + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName + '.json'));
    } else if (fs.existsSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json'));
    } else {
        throw new Error('Cannot find ' + controllerDir + '/conf/' + appName + '.json');
    }
}
function getConfig() {
    var fs = require('fs');
    if (fs.existsSync(controllerDir + '/conf/' + appName + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName + '.json'));
    } else if (fs.existsSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json')) {
        return JSON.parse(fs.readFileSync(controllerDir + '/conf/' + appName.toLowerCase() + '.json'));
    } else {
        throw new Error('Cannot find ' + controllerDir + '/conf/' + appName + '.json');
    }
}
function getConfig ( ) { var fs = require ( 'fs' ) ; if ( fs . existsSync ( controllerDir + '/conf/' + appName + '.json' ) ) { return JSON . parse ( fs . readFileSync ( controllerDir + '/conf/' + appName + '.json' ) ) ; } else if ( fs . existsSync ( controllerDir + '/conf/' + appName . toLowerCase ( ) + '.json' ) ) { return JSON . parse ( fs . readFileSync ( controllerDir + '/conf/' + appName . toLowerCase ( ) + '.json' ) ) ; } else { throw new Error ( 'Cannot find ' + controllerDir + '/conf/' + appName + '.json' ) ; } }
Read controller configuration file
Read controller configuration file