lib/js/Server.js
function(dir) {

        // Load the package.json if it exists (and remove relative refs)
        var pkg;
        dir = Path.resolve(dir);
        try {
          pkg = JSON.parse(FS.readFileSync(dir + '/package.json', 'utf-8'));
        } catch (e) {
          // Report an error if the package.json has a parse problem.  This is
          // good during app development to show why we didn't discover the app.
          if (e.code !== "ENOENT") {
             console.error("Problem parsing " + dir + "/package.json");
          }
          return false;
        }

        // Is this a monitor-dashboard app?
        var isMonitorApp = pkg.dependencies && _.find(_.keys(pkg.dependencies), function(keyword){ return keyword === 'monitor-dashboard'; });
        if (!isMonitorApp) {
          return false;
        }

        // This is a monitor-dashboard app.
        return t.loadApp(dir, pkg);
      }
function(dir) {

        // Load the package.json if it exists (and remove relative refs)
        var pkg;
        dir = Path.resolve(dir);
        try {
          pkg = JSON.parse(FS.readFileSync(dir + '/package.json', 'utf-8'));
        } catch (e) {
          // Report an error if the package.json has a parse problem.  This is
          // good during app development to show why we didn't discover the app.
          if (e.code !== "ENOENT") {
             console.error("Problem parsing " + dir + "/package.json");
          }
          return false;
        }

        // Is this a monitor-dashboard app?
        var isMonitorApp = pkg.dependencies && _.find(_.keys(pkg.dependencies), function(keyword){ return keyword === 'monitor-dashboard'; });
        if (!isMonitorApp) {
          return false;
        }

        // This is a monitor-dashboard app.
        return t.loadApp(dir, pkg);
      }
function ( dir ) { // Load the package.json if it exists (and remove relative refs) var pkg ; dir = Path . resolve ( dir ) ; try { pkg = JSON . parse ( FS . readFileSync ( dir + '/package.json' , 'utf-8' ) ) ; } catch ( e ) { // Report an error if the package.json has a parse problem.  This is // good during app development to show why we didn't discover the app. if ( e . code !== "ENOENT" ) { console . error ( "Problem parsing " + dir + "/package.json" ) ; } return false ; } // Is this a monitor-dashboard app? var isMonitorApp = pkg . dependencies && _ . find ( _ . keys ( pkg . dependencies ) , function ( keyword ) { return keyword === 'monitor-dashboard' ; } ) ; if ( ! isMonitorApp ) { return false ; } // This is a monitor-dashboard app. return t . loadApp ( dir , pkg ) ; }
Test an app directory to see if it's a monitor app
Test an app directory to see if it s a monitor app