forked from mtusi2026/mtusi2026lab5
Использовать порт 8080 и общую настройку адреса проверок
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user