Files
pricing_review/CostReview/app/run_server_headless.py
2026-10-11 10:52:01 +08:00

19 lines
616 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""无窗口启动后台服务(2026-10-07):双击 启动造价审核.bat 弹软件窗口时用的是 launch.py;
这个入口只起 HTTP 服务本身,不弹窗、不开浏览器 —— 给"服务已在运行但要换新代码"的场景用。
用法:python run_server_headless.py (Ctrl+C 或结束进程 = 停服务)
"""
import os
import sys
APP = os.path.dirname(os.path.abspath(__file__))
os.chdir(APP)
sys.path.insert(0, APP)
for sub in ("server", "core"):
sys.path.insert(0, os.path.join(APP, sub))
import api_server
if __name__ == "__main__":
api_server.run()