mirror of
https://github.com/StefBuwalda/ProjectIOT.git
synced 2025-10-29 10:49:58 +00:00
20 lines
566 B
Python
20 lines
566 B
Python
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="0.0.0.0", port=2222, debug=True)
|