dev: 编写了测试路由,细化了项目结构

This commit is contained in:
2026-01-02 17:12:24 +08:00
parent 914ab9ec43
commit 686d828bfc
17 changed files with 204 additions and 78 deletions
+12
View File
@@ -0,0 +1,12 @@
from flask import Flask
def create_app(config_class='config.DevelopmentConfig'):
app = Flask(__name__)
app.config.from_object(config_class)
# 注册蓝图
from app.routes.pages import page_bp
app.register_blueprint(page_bp)
return app
View File
+7
View File
@@ -0,0 +1,7 @@
from flask import Blueprint, jsonify
page_bp = Blueprint("page", __name__, "/")
@page_bp.route("/")
def index():
return jsonify({"code": "200", "message": "Service normal"})
View File
View File
View File