初始提交:造价审核系统源码(不含数据库与生成物)
This commit is contained in:
18
造价审核/app/run_server_headless.py
Normal file
18
造价审核/app/run_server_headless.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# -*- 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()
|
||||
Reference in New Issue
Block a user