aboutsummaryrefslogtreecommitdiff
"""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}")