parent
6a33886ddb
commit
dfd3589a83
1 changed files with 4 additions and 2 deletions
|
|
@ -36,8 +36,10 @@ def serve(
|
||||||
"timeout": timeout,
|
"timeout": timeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
if platform.system() == "Darwin":
|
if platform.system() in ["Darwin", "Windows"]:
|
||||||
# Run using uvicorn on MacOS
|
# 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
|
import uvicorn
|
||||||
|
|
||||||
uvicorn.run(app, host=host, port=port, log_level="info")
|
uvicorn.run(app, host=host, port=port, log_level="info")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue