Merge pull request #33 from logspace-ai/windows_fix

Windows now uses Uvicorn
This commit is contained in:
Rodrigo Nader 2023-03-17 09:12:46 -03:00 committed by GitHub
commit eadf732e5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,8 +36,10 @@ def serve(
"timeout": timeout,
}
if platform.system() == "Darwin":
# Run using uvicorn on MacOS
if platform.system() in ["Darwin", "Windows"]:
# Run using uvicorn on MacOS and Windows
# Windows doesn't support gunicorn
# MacOS requires a env variable to be set to use gunicorn
import uvicorn
uvicorn.run(app, host=host, port=port, log_level="info")