from flask import Flask

import app_conf

from web.api.receive import api_receive_bp
from web.page import page_bp


conf = app_conf.conf()


app = Flask(__name__)
app.register_blueprint(page_bp)
app.register_blueprint(api_receive_bp)


if __name__ == "__main__":
    app.run(
        debug=conf.getboolean("server", "debug"),
        host=conf.get("server", "host"),
        port=conf.get("server", "port"),
        threaded=conf.getboolean("server", "threaded"),
    )
