Использовать порт 8080 и общую настройку адреса проверок

This commit is contained in:
TAskMAster339
2026-11-05 23:48:46 +03:00
parent d3c153f702
commit 390f482382
5 changed files with 16 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
"""Public API address for checks of the regular lab5 stack."""
import os
from pathlib import Path
from init_env import read_values
def api_base_url():
values = read_values(Path(__file__).resolve().parents[1] / ".env")
port = os.environ.get("API_HTTP_PORT", values.get("API_HTTP_PORT", "8080"))
return os.environ.get("BASE_URL", "http://127.0.0.1:" + port)