index.js
function createLocation () {
  var deferred = q.defer();

  // Make the directory, and report status
  mkdirp(globalConfig.db.location, function (err, made) {
    if(err) return deferred.reject(err);

    deferred.resolve(made);
  });

  return deferred.promise;
}
function createLocation () {
  var deferred = q.defer();

  // Make the directory, and report status
  mkdirp(globalConfig.db.location, function (err, made) {
    if(err) return deferred.reject(err);

    deferred.resolve(made);
  });

  return deferred.promise;
}
function createLocation ( ) { var deferred = q . defer ( ) ; // Make the directory, and report status mkdirp ( globalConfig . db . location , function ( err , made ) { if ( err ) return deferred . reject ( err ) ; deferred . resolve ( made ) ; } ) ; return deferred . promise ; }
Verifies the database location exists

@return {promise} Denotes success or failure of folder creation
Verifies the database location exists