code: function servePublicFile(file, type, maxAge) {
      const publicFileMiddleware = createPublicFileMiddleware(file, type, maxAge);
  
      return function servePublicFile(req, res, next) {
          if (req.path === '/' + file) {
              return publicFileMiddleware(req, res, next);
          } else {
              return next();
          }
      };
  }
docs: ### servePublicFile Middleware Handles requests to robots.txt and favicon.ico (and caches them)