File size: 317 Bytes
9a006ec
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import os, uvicorn, dotenv

dotenv.load_dotenv()

if __name__ == "__main__":
    uvicorn.run(
        "comet.main:app",
        host=os.getenv("FASTAPI_HOST", "127.0.0.1"),
        port=int(os.getenv("FASTAPI_PORT", "8000")),
        workers=int(os.getenv("FASTAPI_WORKERS", 2*(os.cpu_count() or 1))),
    )