From 93c3f7a2a6279b696ddec97dd12f8752a2359fe7 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Tue, 27 Jun 2023 11:09:26 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(=5F=5Fmain=5F=5F.py):=20add=20?= =?UTF-8?q?optional=20static=5Ffiles=5Fdir=20parameter=20to=20setup=5Fapp?= =?UTF-8?q?=20function=20The=20variable=20name=20static=5Ffiles=5Fdir=20wa?= =?UTF-8?q?s=20changed=20to=20improve=20semantics.=20It=20is=20now=20more?= =?UTF-8?q?=20clear=20that=20it=20is=20a=20directory=20path.=20An=20option?= =?UTF-8?q?al=20static=5Ffiles=5Fdir=20parameter=20was=20added=20to=20the?= =?UTF-8?q?=20setup=5Fapp=20function=20to=20allow=20for=20a=20directory=20?= =?UTF-8?q?path=20to=20be=20passed=20in.=20This=20allows=20for=20more=20fl?= =?UTF-8?q?exibility=20in=20serving=20static=20files.=20=F0=9F=90=9B=20fix?= =?UTF-8?q?(=5F=5Fmain=5F=5F.py):=20fix=20static=5Ffiles=5Fdir=20variable?= =?UTF-8?q?=20name=20to=20improve=20semantics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/langflow/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/langflow/__main__.py b/src/backend/langflow/__main__.py index 377339c98..9980a5d2f 100644 --- a/src/backend/langflow/__main__.py +++ b/src/backend/langflow/__main__.py @@ -142,8 +142,8 @@ def serve( cache=cache, ) # create path object if path is provided - path = Path(path) if path else path - app = setup_app(static_files_dir=path) + static_files_dir: Optional[Path] = Path(path) if path else None + app = setup_app(static_files_dir=static_files_dir) # check if port is being used if is_port_in_use(port, host): port = get_free_port(port)