code: function Router(req, res, next) {
          const server = this;
          const state = {
              method: req.method.toUpperCase(),
              params: {},
              routes: routes.concat(),
              routeUnhandled: true,
              server: server,
          };
          run(state, req, res, err => {
              req.params = {};
              if (state.routeUnhandled) req.log('unhandled', 'Router had no matching paths');
              next(err);
          });
      }
docs: define the router middleware