19 lines
645 B
Python
19 lines
645 B
Python
import os
|
|
from api import app
|
|
from api.lib import db_manager
|
|
|
|
if __name__ == '__main__':
|
|
# 检查数据库文件是否存在
|
|
if not os.path.exists('db/data'):
|
|
print(f"错误: 数据库文件不存在")
|
|
print("正在下载云端数据库")
|
|
db_manager.download_db()
|
|
print("下载完成")
|
|
|
|
print("启动聊天网页服务...")
|
|
print("访问地址: http://localhost:9000")
|
|
print("问答页面: http://localhost:9000/qa")
|
|
print("周报页面: http://localhost:9000/weekly_report")
|
|
print("日报页面: http://localhost:9000/daily_report")
|
|
app.run(debug=True, host='0.0.0.0', port=9000)
|