Update app to use envs for server info

This commit is contained in:
Logan Cusano
2025-04-27 00:53:18 -04:00
parent 9ade2f9249
commit 886c45261f
3 changed files with 8 additions and 9 deletions

View File

@@ -1,15 +1,16 @@
import asyncio
import websockets
import json
import uuid # To generate a unique client ID
import uuid
import os
from drb_cdb_api import DRBCDBAPI, ConfigGenerator
from server_api import RadioAPIClient
from enum import Enum
# --- Client Configuration ---
SERVER_WS_URI = "ws://localhost:8765"
SERVER_API_URL = "http://localhost:5000"
CLIENT_API_URL = "http://localhost:8001"
SERVER_WS_URI = os.getenv("SERVER_WS_URI", "ws://localhost:8765")
SERVER_API_URL = os.getenv("SERVER_API_URL", "http://localhost:5000")
CLIENT_API_URL = os.getenv("CLIENT_API_URL", "http://localhost:8001")
# Generate or define a unique ID for THIS client instance
# In a real app, this might come from config or a login process
CLIENT_ID = f"client-{uuid.uuid4().hex[:8]}" # TODO - Implement persistent ID