You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
575 B

"""
TermControlAgent 主模块 - 使用应用工厂模式
"""
import os
from app.core.app import create_app
from app.core.config import config
# 根据环境变量确定运行环境
environment = os.getenv("ENVIRONMENT", "development")
# 创建应用实例
app = create_app(
title=config.app_name,
description="终端设备控制平台",
version=config.app_version,
environment=environment
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(
app,
host=config.host,
port=config.port,
reload=config.debug
)