What a FastAPI App Needs Before You Deploy It (with a ShardCloud Walkthrough)
You run python -m uvicorn main:app, open /docs, and try an endpoint. Everything works. Then you deploy the same app and the public URL returns 502 Bad Gateway. The startup log might even say Uvicorn is running. The next thing to check is the address and port…


