code: function buildDbConfig(appName, config) {
      var dbDriver = fetchFromConfig(appName, config, 'dbDriver') || 'mongo';
      var defaultPort = dbDriver === 'mongo' ? 27017 : 5432;
      return {
          dbName:         fetchFromConfig(appName, config, 'dbName'),
          dbPath:         fetchFromConfig(appName, config, 'dbPath'),
          dbDriver:       dbDriver,
          dbType:         fetchFromConfig(appName, config, 'dbType')        || 'mongo',
          dbUser:         fetchFromConfig(appName, config, 'dbUser')        || 'nodejs',
          dbPassword:     fetchFromConfig(appName, config, 'dbPassword')    || null,
          dbConnections:  parseInt(fetchFromConfig(appName, config, 'dbConnections')) || 20,
          dbConcurrency:  parseInt(fetchFromConfig(appName, config, 'dbConcurrency')) || 5,
          dbConnectionTimeout: parseInt(fetchFromConfig(appName, config, 'dbConnectionTimeout')) || 60000,
          dbPort: fetchFromConfig(appName, config, 'dbPort') || defaultPort,
          knexDebug: fetchFromConfig(appName, config, 'knexDebug') || false
      };
  }
docs: Builds a data base config, pulling options from the app config.
  
  @param {String} appName - The app name.
  @param {Object} config - The app specific config from the config store.
  
  @returns {Object} An object containing all the dbconfig options.