blob: 41611ae287bbd9185f4624d7df29f9f206209e57 [file] [log] [blame]
from flask import Flask
from flask_cors import CORS
def create_app():
app = Flask(__name__)
# 启用CORS支持跨域请求
CORS(app)
# Load configuration
app.config.from_object('config.Config')
# Register blueprints or routes
from .routes import main as main_blueprint
app.register_blueprint(main_blueprint)
return app
app = create_app()