Fix launching of IfcTester webapp with Bonsai

This commit is contained in:
Dion Moult
2025-10-05 15:11:18 +11:00
parent fe333051df
commit add5132dec
3 changed files with 31 additions and 1 deletions
+10
View File
@@ -17,8 +17,18 @@
# along with IfcTester. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import argparse
import mimetypes
bonsai_lib_path = os.environ.get("BONSAI_LIB_PATH")
print(os.environ)
print(bonsai_lib_path)
bonsai_version = os.environ.get("BONSAI_VERSION")
if bonsai_lib_path:
sys.path.insert(0, bonsai_lib_path)
from flask import Flask, send_from_directory, send_file
# Browsers expecting this specific MIME type for .mjs files,