mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 11:19:58 +00:00
18 lines
384 B
Python
18 lines
384 B
Python
from application import app
|
|
from flask import redirect, url_for
|
|
from flask_login import current_user, login_required
|
|
|
|
|
|
# home route
|
|
@app.route("/")
|
|
def index():
|
|
if current_user.is_authenticated:
|
|
return redirect(url_for("dash.index"))
|
|
else:
|
|
return redirect(url_for("auth.login"))
|
|
|
|
|
|
# App deployment
|
|
if __name__ == "__main__":
|
|
app.run(debug=True, port=5000)
|