aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-06-25 15:31:03 -0500
committerFrederick Muriuki Muriithi2024-06-25 15:31:03 -0500
commit9a8dddab072748a70d43416ac8e6db69ad6fb0cb (patch)
tree425b575fbf28341f5a7e2c62d6c6b7ec7184f09c
parent3059c46b2d14f7f1002de8ab476adcfa520b0b35 (diff)
downloadgn-uploader-9a8dddab072748a70d43416ac8e6db69ad6fb0cb.tar.gz
Add route to fetch node-js modules.
-rw-r--r--qc_app/base_routes.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/qc_app/base_routes.py b/qc_app/base_routes.py
index 9023fec..9daf439 100644
--- a/qc_app/base_routes.py
+++ b/qc_app/base_routes.py
@@ -20,3 +20,10 @@ def jquery(filename):
"""Fetch jquery files."""
return send_from_directory(
appenv(), f"share/genenetwork2/javascript/jquery/{filename}")
+
+
+@base.route("/node-modules/<path:filename>")
+def node_modules(filename):
+ """Fetch node-js modules."""
+ return send_from_directory(
+ appenv(), f"lib/node_modules/{filename}")