function startAllConnections() {
  try {
    myUtils.validateConfig();
  }
  catch(e) {
    console.error(e.message);
    process.exit(2);
  }
  // create new singleton object to hold all connections
  redisConnections = connectionWrapper.setConnectionList([]);

  // redefine keys method before connections are started
  if (config.get('redis.useScan')) {
    console.log('Using scan instead of keys');
    const keysCallbackFunc = function(that, pattern, cb) {
      let keys = [];

      let scanCB = function(err, res) {
        if (err) {
          switch (typeof cb) {
            case 'function':
              cb(err);
              break;
            case 'object':   // promise
              cb.reject(err);
              break;
            default:
              console.log('ERROR in redefined "keys" function to use "scan" instead without callback: ' +
                (err.message ? err.message : JSON.stringify(err)));
          }
        }
        else {
          let count = res[0], curKeys = res[1];
          keys = keys.concat(curKeys);
          if (Number(count) === 0) {
            switch (typeof cb) {
              case 'function':
                cb(null, keys);
                break;
              case 'object':
                cb.resolve(keys);
                break;
              default:
                console.log('ERROR in redefined "keys" function to use "scan" instead - no callback given!');
            }
          }
          else {
            that.scan(count, 'MATCH', pattern, 'COUNT', config.get('redis.scanCount'), scanCB);
          }
        }
      };
      return that.scan(0, 'MATCH', pattern, 'COUNT', config.get('redis.scanCount'), scanCB);
    }

    Object.defineProperty(Redis.prototype, 'keys', {
      value: function(pattern, cb) {
        if (!cb) {
          const that = this;
          cb = new Promise(function(resolve, reject) {
            keysCallbackFunc(that, pattern, {resolve: resolve, reject: reject});
          });
          return cb;
        }
        keysCallbackFunc(this, pattern, cb);
      }
    });
  }

  // first connection from cli params (redis-host, redis-port, ...)
  // second default connections from config object (to allow override of pw changed and so on)
  let client;
  let newDefault = createConnectionObjectFromArgs(args);
  if (newDefault) {
    client = myUtils.createRedisClient(newDefault);
    redisConnections.push(client);
    redisConnections.setUpConnection(client);

    // now check if this one is already part of default connections
    // update it if needed
    let configChanged = false;
    let oldDefault = connectionWrapper.findConnection(config.connections, newDefault);
    if (!oldDefault) {
      config.connections.push(newDefault);
      configChanged = true;
    }
    else {
      // remove connectionId from newDefaults to allow comparison, otherwise non-equal every time
      delete newDefault.connectionId;
      if (!isEqual(oldDefault, newDefault)) {
        connectionWrapper.replaceConnection(config.connections, oldDefault, newDefault);
        configChanged = true;
      }
    }

    if (configChanged && !config.get('noSave')) {
      myUtils.saveConnections(config,function (err) {
        if (err) {
          console.log("Problem saving connection config.");
          console.error(err);
        }
      });
    }
  }
  else if (config.connections.length === 0) {
    // fallback to localhost if nothing else configured
    client = myUtils.createRedisClient({label: config.get('redis.defaultLabel')});
    redisConnections.push(client);
    redisConnections.setUpConnection(client);
  }

  // now start all default connections (if not same as one given via command line)...
  startDefaultConnections(config.connections, function (err) {
    if (err) {
      console.log(err);
      process.exit();
    }

    return startWebApp();
  });

  // wait a bit before starting browser to let http server start
  if (args['open']) {
    setTimeout(function() {
      let address = '127.0.0.1';
      if (config.get('server.address') !== '0.0.0.0' && config.get('server.address') !== '::') {
        address = config.get('server.address');
      }
      require('opener')('http://' + address + ':' + config.get('server.port'));
    }, 1000);
  }
}
function to start all confugred connections from config and command line