feat:搭建项目结构

This commit is contained in:
2024-12-23 11:01:44 +08:00
parent fec24a50e0
commit aaf297717a
7 changed files with 53 additions and 0 deletions

30
main.py Normal file
View File

@@ -0,0 +1,30 @@
from flask import *
from init import init_all
from conf.util import *
# from web import app
from web.api import api_bp
from web.page import page_bp
app = Flask(__name__)
# 获取配置对象
conf = get_config_object()
# 注册路由
app.register_blueprint(api_bp)
app.register_blueprint(page_bp)
# 启动
if __name__ == '__main__':
# 初始化
init_all()
# 运行Kafka与Spark相关
# run_kafka_spark()
# 运行Web服务
app.run(host=conf.get('web', 'host'), port=conf.get('web', 'port'), debug=conf.get('web', 'debug'))