def setup(self, app: web.Application):
        """ Installation routes to app.router

        :param app: instance of aiohttp.web.Application
        """
        if self.app is app:
            raise ValueError('The router is already configured '
                             'for this application')
        self.app = app
        routes = sorted(
            ((r.name, (r, r.url_for().human_repr())) for r in self.routes()),
            key=utils.sort_key)
        exists = set()  # type: Set[str]
        for name, (route, path) in routes:
            if name and name not in exists:
                exists.add(name)
            else:
                name = None
            app.router.add_route(
                route.method, path,
                route.handler, name=name)
Installation routes to app.router

        :param app: instance of aiohttp.web.Application