util/configLoader.js
function( path) {

    var stat = null;

    try {
        stat = fs.statSync( path );
    } catch (err) {
        console.log(err);
    }

    return ( stat && stat.isFile() );
}
function( path) {

    var stat = null;

    try {
        stat = fs.statSync( path );
    } catch (err) {
        console.log(err);
    }

    return ( stat && stat.isFile() );
}
function ( path ) { var stat = null ; try { stat = fs . statSync ( path ) ; } catch ( err ) { console . log ( err ) ; } return ( stat && stat . isFile ( ) ) ; }
Loads config file with many options

@param configDir - directory which should be used for
@param options - object that can take following parameters:

configEnvironmentVar: key that is used on process.env[<key>] to use it as oath to config directory
subDirPath: path within the directory loaded over configEnvironmentVar
fileToBeLoaded: name of the file that should be found
altDirNameKey: if directory has an index.js we will require it and use this key to get get the path for the subdirectory
altFileNameKey: if directory has an index.js we will require it and use this key to get get the file name that should be loaded
defaultFilePath: path to fallback file
Loads config file with many options