code: function createMiddleware(options, archiveFormat) {
    /**
     * Express middleware handling GitHub API archive link requests
     *
     * @param {Request} req Request object
     * @param {Response} res Response object
     * @param {callback} next next middleware in chain
     *
     * @see https://developer.github.com/v3/repos/contents/#get-archive-link
     */
    return (req, res) => {
      // GET /repos/:owner/:repo/:archive_format/:ref
      const { owner } = req.params;
      const repoName = req.params.repo;
      const refName = req.params.ref || 'master';
  
      const host = req.mappedSubDomain ? `localhost:${options.listen[req.protocol].port}` : req.headers.host;
      const location = `${req.protocol}://${host}/codeload/${owner}/${repoName}/${archiveFormat}/${refName}`;
  
      res.writeHead(302, {
        Location: location,
      });
      res.end();
    };
  }
docs: Export the raw content handler (express middleware) through a parameterizable function
  
  @param {object} options configuration hash
  @param {string} archiveFormat 'zip' or 'tar.gz'
  @returns {function(*, *, *)} handler function