from application import app
from application.api.views import api_blueprint
from application.auth.views import auth_blueprint
from application.dashboard.views import dash_blueprint
from flask import redirect, url_for

app.register_blueprint(api_blueprint, url_prefix="/api")
app.register_blueprint(auth_blueprint, url_prefix="/auth")
app.register_blueprint(dash_blueprint, url_prefix="/dash")


# Default app route
@app.route("/")
def home():
    return redirect(url_for("auth.login"))


if __name__ == "__main__":
    app.run(host="localhost", port=2222, debug=True)
