aboutsummaryrefslogtreecommitdiff
path: root/qc_app/base_routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'qc_app/base_routes.py')
-rw-r--r--qc_app/base_routes.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/qc_app/base_routes.py b/qc_app/base_routes.py
new file mode 100644
index 0000000..dbfcf48
--- /dev/null
+++ b/qc_app/base_routes.py
@@ -0,0 +1,15 @@
+"""Basic routes required for all pages"""
+import os
+from flask import Blueprint, send_from_directory
+
+base = Blueprint("base", __name__)
+
+def appenv():
+ """Get app's guix environment path."""
+ return os.environ.get("GN_UPLOADER_ENVIRONMENT")
+
+@base.route("/bootstrap/<path:filename>")
+def bootstrap(filename):
+ """Fetch bootstrap files."""
+ return send_from_directory(
+ appenv(), f"share/genenetwork2/javascript/bootstrap/{filename}")