From 0450d856565ba4b947557fbb0a7c401bdf3daddd Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Fri, 9 Jun 2023 13:38:45 +0200 Subject: [PATCH] fix uvicorn call signature --- liveandletdie/__init__.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/liveandletdie/__init__.py b/liveandletdie/__init__.py index a871fe4..c44ea66 100644 --- a/liveandletdie/__init__.py +++ b/liveandletdie/__init__.py @@ -566,12 +566,15 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def create_command(self): - path_without_extension = self.path.rsplit('.', 1)[0] - return [ self.executable, - '{}:app'.format(path_without_extension), - '--host {}'.format(self.host), - '--port {}'.format(self.port), + '--app-dir', + os.path.dirname(self.path), + '--host', + self.host, + '--port', + self.port, + 'main:app', '--reload', ] +