Fix Render port binding - preload_app=False, add early env debug

This commit is contained in:
ajaysi
2026-04-06 07:01:02 +05:30
parent 1f139e3167
commit c0a5f5fdeb
2 changed files with 9 additions and 2 deletions

View File

@@ -1,6 +1,12 @@
# Ensure typing constructs and models are available globally for FastAPI type annotation evaluation
import os
# Print env vars immediately - BEFORE any imports
print(f"[app.py] EARLY - PORT={os.getenv('PORT')}, HOST={os.getenv('HOST')}", flush=True)
import typing
import builtins
import builtins
# Make common typing constructs available globally
builtins.Optional = typing.Optional