def register_routes(self): self.api.register_routes(self.app) self.app.router.add_static('/static', path=ledfx_frontend.where(), name='static') self.app.router.add_route('get', '/', self.index) self.app.router.add_route('get', '/{extra:.+}', self.index)
def register_routes(self): self.api.register_routes(self.app) self.app.router.add_route("get", "/favicon.ico", self.favicon) self.app.router.add_route("get", "/manifest.json", self.manifest) self.app.router.add_static( "/static", path=ledfx_frontend.where() + "/static", name="static", ) self.app.router.add_route("get", "/", self.index) self.app.router.add_route("get", "/{extra:.+}", self.index)
async def manifest(self, response): return web.FileResponse(path=ledfx_frontend.where() + "/manifest.json", status=200)
async def favicon(self, response): return web.FileResponse(path=ledfx_frontend.where() + "/favicon.ico", status=200)