server/boot/load-model.js
function(err) {
      if (!err) {
        loadData(app, apimanager, models, true, uid);
      }
      if (!apimanager.host) {
        //monitor the file changes, load data again if any changes
        fs.watch(definitionsDir, function(event, filename) {
          if (filename !== '.datastore') {
            logger.debug('File changed in %s%s, reload data', definitionsDir, filename);
            loadData(app, apimanager, models, false, uid);
          }
        });
      }
    }
function(err) {
      if (!err) {
        loadData(app, apimanager, models, true, uid);
      }
      if (!apimanager.host) {
        //monitor the file changes, load data again if any changes
        fs.watch(definitionsDir, function(event, filename) {
          if (filename !== '.datastore') {
            logger.debug('File changed in %s%s, reload data', definitionsDir, filename);
            loadData(app, apimanager, models, false, uid);
          }
        });
      }
    }
function ( err ) { if ( ! err ) { loadData ( app , apimanager , models , true , uid ) ; } if ( ! apimanager . host ) { //monitor the file changes, load data again if any changes fs . watch ( definitionsDir , function ( event , filename ) { if ( filename !== '.datastore' ) { logger . debug ( 'File changed in %s%s, reload data' , definitionsDir , filename ) ; loadData ( app , apimanager , models , false , uid ) ; } } ) ; } }
load the data into the models
load the data into the models