from utils import conf from flask_cors import CORS from blues import com, idc, bank from flask import Flask, render_template, Response def init() -> "Flask": this = Flask(__name__) CORS(this) this.config.from_object(conf) this.register_blueprint(com) this.register_blueprint(idc) this.register_blueprint(bank) return this app = init() @app.route("/") def index(): return render_template("navigate.html") @app.route("/favicon.ico") def icon(): with open("static/html/icon/favicon.png", "rb") as f: img = f.read() f.close() return Response(img, mimetype="image/x-png") if __name__ == "__main__": app.run(host=conf.SERVER_HOST, port=conf.SERVER_PORT)