20 lines
461 B
Python
20 lines
461 B
Python
from app import create_app, db
|
|
from app.routes import globals
|
|
from src.main import Consultation
|
|
import sys
|
|
from pathlib import Path
|
|
sys.path.append(str(Path(__file__).parent))
|
|
app = create_app()
|
|
|
|
# 初始化数据库并创建表
|
|
with app.app_context():
|
|
db.create_all()
|
|
|
|
# 初始化Consultation对象
|
|
globals.consultation = Consultation()
|
|
print(globals.consultation)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
app.run(host='0.0.0.0',debug=True,port=5010)
|