- 将 routes/admin.py (672行) 拆分为 routes/admin/ 包 - 按功能模块拆分:auth, dashboard, articles, categories, tags, settings, stats, upload, authors - 端口从 16012 改为 16013 - 初始化数据库和管理员账户
11 lines
293 B
Python
11 lines
293 B
Python
"""启动脚本"""
|
||
import os
|
||
from app import create_app
|
||
|
||
# 创建应用
|
||
app = create_app(os.environ.get('FLASK_ENV', 'development'))
|
||
|
||
if __name__ == '__main__':
|
||
# 从环境变量获取端口,默认16012
|
||
port = int(os.environ.get('PORT', 16013))
|
||
app.run(host='0.0.0.0', port=port) |