docs: function initialize(middlewareOpts) {
      var logger = middlewareOpts.logger.fork('ExampleRestRouter'),
          ensureAuthenticated = middlewareOpts.ensureAuthenticated,
          getUserId = middlewareOpts.getUserId;
  
      logger.debug('initializing ...');
  
      // Ensure authenticated can be used only after this rule.
      router.use('*', function (req, res, next) {
          // TODO: set all headers, check rate limit, etc.
  
          // This header ensures that any failures with authentication won't redirect.
          res.setHeader('X-WebGME-Media-Type', 'webgme.v1');
          next();
      });
  
      // Use ensureAuthenticated if the routes require authentication. (Can be set explicitly for each route.)
      router.use('*', ensureAuthenticated);
  
      router.get('/getExample', function (req, res/*, next*/) {
          var userId = getUserId(req);
  
          res.json({userId: userId, message: 'get request was handled'});
      });
  
      router.patch('/patchExample', function (req, res/*, next*/) {
          res.sendStatus(200);
      });
  
  
      router.post('/postExample', function (req, res/*, next*/) {
          res.sendStatus(201);
      });
  
      router.delete('/deleteExample', function (req, res/*, next*/) {
          res.sendStatus(204);
      });
  
      router.get('/error', function (req, res, next) {
          next(new Error('error example'));
      });
  
      logger.debug('ready');
  }