fix: run frontend without virtualenv

- Modify app.py to add vendor/ to sys.path so pip --target works.
- Add frontend/.gitignore to exclude vendor/, __pycache__, thermopro.db.
- Update README with pip --target instructions.
This commit is contained in:
Keith Solomon
2026-07-20 20:28:10 -05:00
parent 9e32b1b179
commit c80de43f55
3 changed files with 46 additions and 14 deletions
+7
View File
@@ -1,7 +1,14 @@
import json
import sys
import threading
import time
from datetime import datetime, timezone
from pathlib import Path
# Add vendor/ to the import path so pip --target dependencies are found.
vendor_path = Path(__file__).parent / "vendor"
if vendor_path.exists():
sys.path.insert(0, str(vendor_path))
import requests
from flask import Flask, jsonify, request, render_template