code: function createMiddleware(options) {
    /**
     * Express middleware handling Git (Smart) Transfer Protocol requests
     *
     * @param {Request} req Request object
     * @param {Response} res Response object
     * @param {callback} next next middleware in chain
     *
     * @see https://git-scm.com/book/en/v2/Git-Internals-Transfer-Protocols
     * @see https://github.com/git/git/blob/master/Documentation/technical/http-protocol.txt
     */
    return (req, res, next) => {
      const { owner, repo } = req.params;
  
      const repPath = resolveRepositoryPath(options, owner, repo);
      const reqStream = req.headers['content-encoding'] === 'gzip' ? req.pipe(zlib.createGunzip()) : req;
      reqStream.pipe(backend(req.originalUrl, (err, service) => {
        if (err) {
          logger.error(err);
          next(err);
          return;
        }
  
        res.setHeader('content-type', service.type);
        logger.info(service.action, repo, service.fields);
  
        const ps = spawn(service.cmd, service.args.concat(repPath));
        ps.stdout.pipe(service.createStream()).pipe(ps.stdin);
      })).pipe(res);
    };
  }
docs: Export the transfer protocol handler (express middleware) through a parameterizable function
  
  @param {object} options configuration hash
  @returns {function(*, *, *)} handler function