from flask import Flask

from common.init_bp import register_bp
from common.error_handle import register_error_handler
from conf import config


def create_app() -> Flask:
    app = Flask(__name__)
    app.config.from_object(config)
    register_bp(app, app.config['BLUEPRINT'])
    register_error_handler(app)
    return app


app = create_app()

if __name__ == "__main__":
    app.run()

from flask import Flask

from common.init_bp import register_bp
from common.error_handle import register_error_handler
from conf import config


def create_app() -> Flask:
    app = Flask(__name__)
    app.config.from_object(config)
    register_bp(app, app.config['BLUEPRINT'])
    register_error_handler(app)
    return app


app = create_app()

if __name__ == "__main__":
    app.run()
