-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_jarvis.py
More file actions
33 lines (27 loc) · 951 Bytes
/
Copy pathrun_jarvis.py
File metadata and controls
33 lines (27 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""Jarvis Launcher – Startet Server mit HTTPS."""
import uvicorn
from backend.config import config
from backend.security import ensure_certificates, CERT_FILE, KEY_FILE
if __name__ == "__main__":
print("🚀 Starte Jarvis Launcher...")
# Zertifikate sicherstellen
ensure_certificates()
if CERT_FILE.exists() and KEY_FILE.exists():
print("🔐 HTTPS aktiviert.")
ssl_cert = str(CERT_FILE)
ssl_key = str(KEY_FILE)
protocol = "https"
else:
print("⚠️ WARNUNG: Keine Zertifikate gefunden. Fallback auf HTTP.")
ssl_cert = None
ssl_key = None
protocol = "http"
print(f"🌐 Jarvis läuft unter: {protocol}://{config.SERVER_HOST}:{config.SERVER_PORT}")
uvicorn.run(
"backend.main:app",
host=config.SERVER_HOST,
port=config.SERVER_PORT,
ssl_certfile=ssl_cert,
ssl_keyfile=ssl_key,
reload=True
)