code: function (next) {
  
        if (!server) {
          if (!options.protocol) {
            options.protocol = 'http';
          } else if (options.protocol !== 'http' && options.protocol !== 'https') {
            fatal('Protocol must be \'http\' or \'https\'.');
          }
        }
  
        next();
      }
docs: check protocol