21 lines
498 B
Python
21 lines
498 B
Python
import logging
|
|
from pathlib import Path
|
|
from contextvars import ContextVar
|
|
|
|
# --- Project Root ---
|
|
ROOT_DIR = Path(__file__).parent.resolve()
|
|
|
|
# --- Server & Logs ---
|
|
HOST = "127.0.0.1"
|
|
PORT = 8008
|
|
request_host = ContextVar("request_host", default=f"{HOST}:{PORT}")
|
|
LOG_LEVEL = "INFO"
|
|
LOG_FILE = str(ROOT_DIR / "debug.log")
|
|
|
|
# --- WebSocket (Extension) ---
|
|
WS_PATH = "/ws"
|
|
WS_TIMEOUT = 30 # seconds to wait for extension response
|
|
|
|
# --- Extension ---
|
|
EXTENSION_DIR = ROOT_DIR.parent / "extension"
|