code: function startApplication(appName, appDirectory, appList, configStore, sessionStore) {
  
      let path = appDirectory + '/' + appList[appName] + '/';
      let commonPath = appDirectory + '/apps/common/';
      let config = configStore[appName].get();
      let commonJsDir = commonPath + '/js/';
      let controllerJsDir = path + '/public/js/';
  
      if (config.isDaemon || config.serverMode === 'api') {
          controllerJsDir = path + '/js/';
      }
  
      let schema = JSON.parse((readFile(path + '/schema.json') || readFile(commonPath + '/schema.json')).toString());
  
      let controllerPath = (config.controller || 'controller.js');
      let matches = controllerPath.match(/(.*?)([0-9A-Za-z_]*)\.js$/);
      let prefix = matches[1];
      let prop = matches[2];
  
      // TODO: Completely change how we do configurations
      config.nconf = configStore[appName]; // Global config
      config.configStore = configStore;
  
      return setUpInjectObjectTemplate(appName, config, schema)
          .then(buildAppConfigAndLoadTemplates.bind(this, appName, config, controllerJsDir, commonJsDir, sessionStore))
          .spread(finishDaemonIfNeeded.bind(this, config, prop, prefix, appName));
  }
docs: Purpose unknown
  
  @param {String} appName unknown
  @param {unknown} appDirectory unknown
  @param {unknown} appList unknown
  @param {unknown} configStore unknown
  @param {unknown} sessionStore unknown
  
  @returns {unknown} unknown