From bd2891fd204cd71c869cebf60bc3947e6fd2bd5c Mon Sep 17 00:00:00 2001 From: GotthardG <51994228+GotthardG@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:59:51 +0100 Subject: [PATCH] Refactor OpenAPI client script and backend server logic. Simplify and streamline OpenAPI client generation and backend startup logic. Improved error handling, environment configuration, and self-signed SSL certificate management. Added support for generating OpenAPI schema via command-line argument. --- backend/main.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/main.py b/backend/main.py index a0a397d..6d2217a 100644 --- a/backend/main.py +++ b/backend/main.py @@ -169,6 +169,12 @@ if __name__ == "__main__": # Run in CI mode if is_ci: # CI mode print("CI mode detected: Starting server in a subprocess...") + # Ensure SSL directory exists + ssl_dir = Path("ssl") + ssl_dir.mkdir( + parents=True, exist_ok=True + ) # Create ssl directory if it doesn't exist + # Ensure SSL certificate and key exist if not Path(cert_path).exists() or not Path(key_path).exists(): print("Generating SSL certificates for CI mode...")