diff --git a/src/app/app.py b/src/app/app.py index 6d5d494..b25c83b 100644 --- a/src/app/app.py +++ b/src/app/app.py @@ -38,8 +38,12 @@ class BaseApplication(web.Application): middlewares.append(self.session_middleware) super().__init__(middlewares=middlewares, *args, **kwargs) + def run(self, *args, **kwargs): - web.run_app(self, *args, **kwargs) + if kwargs.get('port'): + if not kwargs.get('host'): + kwargs['host'] = '127.0.0.1' + web.run_app(self, *args, **kwargs) async def authenticate(self, username, password): return self.basic_username == username and self.basic_password == password