remove gitignore
This commit is contained in:
21
Html/runs/run_20250911-090321_2uj10i/code/app.py
Normal file
21
Html/runs/run_20250911-090321_2uj10i/code/app.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# 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')
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user