From bc50e23a224619c1a0620e3badd014ff8bff152a Mon Sep 17 00:00:00 2001 From: Tobias Kurze Date: Tue, 26 Mar 2019 11:57:22 +0100 Subject: [PATCH] improved/fixed serve_frontend.py to work from different base paths (change required for wsgi) --- serve_frontend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serve_frontend.py b/serve_frontend.py index 0728456..fa35f66 100644 --- a/serve_frontend.py +++ b/serve_frontend.py @@ -11,7 +11,7 @@ from flask_pyoidc.user_session import UserSession from backend import app from backend.auth import oidc_auth -fe_path = os.path.join(os.getcwd(), "frontend", "dist") +fe_path = os.path.abspath(os.path.join(app.root_path, os.pardir, "frontend", "dist")) fe_bp = Blueprint('frontend', __name__, url_prefix='/', template_folder=os.path.join(fe_path, ""))