Files
hsa/Html/app.py
2025-09-11 01:06:14 +08:00

22 lines
654 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.

# app.py 0.1.1 rise to factory mode
from bootstrap import bootstrap_paths
bootstrap_paths()
from apps import create_app
from apps.extensions import socketio
# 工厂创建 app工厂里已经做了加载配置/注册蓝图/注册 namespaces
app = create_app()
if __name__ == "__main__":
# 仅本地开发用;生产不要用 werkzeug 自带的开发服务器
socketio.run(
app,
host="0.0.0.0",
port=5551,
debug=True, # 开发期打开
allow_unsafe_werkzeug=True, # 避免 dev server 的安全限制提示
ssl_context=('server.crt', 'server.key')
)