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.
15 lines
581 B
15 lines
581 B
from app import app
|
|
import controller.LoginController
|
|
import python.test1 # 👈 关键:导入 test1,触发 @app.get("/getData") 执行
|
|
from service.UserService import init_mysql_connection
|
|
import os
|
|
|
|
# 添加静态文件服务
|
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
resource_dir = os.path.join(current_dir, "resource")
|
|
if os.path.exists(resource_dir):
|
|
app.serve_directory("/resource", resource_dir)
|
|
print(f"静态资源目录已配置: {resource_dir}")
|
|
|
|
if __name__ == "__main__":
|
|
init_mysql_connection() and app.start(host="0.0.0.0", port=8088)
|