work on improving hostability

This commit is contained in:
2026-04-03 20:25:30 -07:00
parent 7ecc225f8c
commit e79ffea14a
7 changed files with 186 additions and 4 deletions

View File

@@ -10,6 +10,7 @@ from the tono/ directory.
import asyncio
import logging
import os
import sys
from pathlib import Path
@@ -25,8 +26,11 @@ logging.basicConfig(
)
log = logging.getLogger(__name__)
HOST = "127.0.0.1"
PORT = 8188
HOST = os.getenv("TONO_HOST", "127.0.0.1")
try:
PORT = int(os.getenv("TONO_PORT", "8188"))
except ValueError:
sys.exit("TONO_PORT must be a valid integer")
def main() -> None: