blob: 41611ae287bbd9185f4624d7df29f9f206209e57 [file] [log] [blame]
Raverafc93da2025-06-15 18:12:49 +08001from flask import Flask
2from flask_cors import CORS
3
4def create_app():
5 app = Flask(__name__)
6
7 # 启用CORS支持跨域请求
8 CORS(app)
9
10 # Load configuration
11 app.config.from_object('config.Config')
12
13 # Register blueprints or routes
14 from .routes import main as main_blueprint
15 app.register_blueprint(main_blueprint)
16
17 return app
18
19app = create_app()