Files
ai-exchange/scripts/run_api_server.py
T
2026-04-24 13:39:01 +08:00

20 lines
394 B
Python

from pathlib import Path
import os
import sys
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from src.api.server import serve_api
def main() -> None:
host = os.getenv("AI_ICT_API_HOST", "0.0.0.0")
port = int(os.getenv("AI_ICT_API_PORT", "8000"))
serve_api(host=host, port=port)
if __name__ == "__main__":
main()