diff --git a/backend/start_alwrity_backend.py b/backend/start_alwrity_backend.py index 97254bcf..26ccb618 100644 --- a/backend/start_alwrity_backend.py +++ b/backend/start_alwrity_backend.py @@ -323,11 +323,13 @@ def start_backend(enable_reload=False, production_mode=False): print(f" šŸ”Œ Port: {port}", flush=True) print(f" šŸ”„ Reload: {reload}", flush=True) print(f"[DEBUG] About to import app module...", flush=True) - print(f"[DEBUG] About to import app and run uvicorn...", flush=True) + print("[DEBUG] >>> START APP IMPORT <<<", flush=True) try: # Import and run the app from app import app + print("[DEBUG] >>> END APP IMPORT <<<", flush=True) + import uvicorn print(f"[DEBUG] Imported app and uvicorn successfully", flush=True) @@ -335,14 +337,14 @@ def start_backend(enable_reload=False, production_mode=False): print("\n🌐 ALwrity Backend Server", flush=True) print("=" * 50, flush=True) - print(" šŸ“– API Documentation: http://localhost:8000/api/docs", flush=True) - print(" šŸ” Health Check: http://localhost:8000/health", flush=True) - print(" šŸ“Š ReDoc: http://localhost:8000/api/redoc", flush=True) + print(f" šŸ“– API Documentation: http://localhost:{os.getenv('PORT', '8000')}/api/docs", flush=True) + print(f" šŸ” Health Check: http://localhost:{os.getenv('PORT', '8000')}/health", flush=True) + print(f" šŸ“Š ReDoc: http://localhost:{os.getenv('PORT', '8000')}/api/redoc", flush=True) if not production_mode: - print(" šŸ“ˆ API Monitoring: http://localhost:8000/api/content-planning/monitoring/health", flush=True) - print(" šŸ’³ Billing Dashboard: http://localhost:8000/api/subscription/plans", flush=True) - print(" šŸ“Š Usage Tracking: http://localhost:8000/api/subscription/usage/demo", flush=True) + print(f" šŸ“ˆ API Monitoring: http://localhost:{os.getenv('PORT', '8000')}/api/content-planning/monitoring/health", flush=True) + print(f" šŸ’³ Billing Dashboard: http://localhost:{os.getenv('PORT', '8000')}/api/subscription/plans", flush=True) + print(f" šŸ“Š Usage Tracking: http://localhost:{os.getenv('PORT', '8000')}/api/subscription/usage/demo", flush=True) print("\n[STOP] Press Ctrl+C to stop the server", flush=True) print("=" * 50, flush=True)