function loadConfig() {
  let config;

  try {
    config = rc("kuzzle", defaultConfig.default);
  } catch (e) {
    throw kerror.get("cannot_parse", e.message);
  }

  config = unstringify(config);

  checkLimitsConfig(config);
  checkHttpOptions(config);
  checkWebSocketOptions(config);
  checkClusterOptions(config);

  config.internal = {
    hash: {
      seed: Buffer.from("^m&mOISKBvb1xpl1mRsrylaQXpjb&IJX"),
    },
  };

  preprocessHttpOptions(config);
  preprocessProtocolsOptions(config);
  preprocessRedisOptions(config.services.internalCache);
  preprocessRedisOptions(config.services.memoryStorage);

  // Injects the current Kuzzle version
  config.version = packageJson.version;

  return config;
}
Loads, interprets and checks configuration files
@returns {object}