Refactor OpenAPI fetcher for improved clarity and robustness
Reorganized and enhanced the OpenAPI fetch logic for better maintainability and error handling. Key updates include improved environment variable validation, more detailed error messages, streamlined configuration loading, and additional safety checks for file paths and directories. Added proper logging and ensured the process flow is easy to trace.
This commit is contained in:
parent
5a0408062b
commit
f80e111f3b
@ -168,6 +168,9 @@ if __name__ == "__main__":
|
||||
print(f"[INFO] Starting server in {environment} environment...")
|
||||
print(f"[INFO] SSL Certificate Path: {cert_path}")
|
||||
print(f"[INFO] SSL Key Path: {key_path}")
|
||||
port = int(
|
||||
config.get("PORT", os.getenv("PORT", 8000))
|
||||
) # Fetch port from config or environment
|
||||
print(f"[INFO] Running on port {port}")
|
||||
uvicorn.run(
|
||||
app,
|
||||
|
Loading…
x
Reference in New Issue
Block a user