cc-discussion 1.0.0__py3-none-any.whl → 1.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
backend/main.py CHANGED
@@ -38,14 +38,18 @@ logger = logging.getLogger(__name__)
38
38
 
39
39
  # Paths - Support both development and packaged installation
40
40
  ROOT_DIR = Path(__file__).parent.parent
41
- UI_DIST_DIR = ROOT_DIR / "frontend" / "dist"
42
-
43
- # Alternative locations for packaged installation
44
- if not UI_DIST_DIR.exists():
45
- # Try relative to the backend package
46
- UI_DIST_DIR = Path(__file__).parent / ".." / "frontend" / "dist"
47
- if not UI_DIST_DIR.exists():
48
- UI_DIST_DIR = None # No frontend dist available
41
+ UI_DIST_DIR = None
42
+
43
+ # Try locations in order of preference
44
+ _possible_paths = [
45
+ ROOT_DIR / "frontend" / "dist", # Development: project root
46
+ Path(__file__).parent / "static", # Packaged: backend/static (copied during build)
47
+ ]
48
+
49
+ for _path in _possible_paths:
50
+ if _path.exists() and (_path / "index.html").exists():
51
+ UI_DIST_DIR = _path
52
+ break
49
53
 
50
54
 
51
55
  @asynccontextmanager