Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/bdweb/backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,6 @@ def run_diagram(req: RunRequest) -> dict[str, Any]:
# Serve built SvelteKit app (production only — dev uses Vite)
# ---------------------------------------------------------------------------

_frontend_build = Path(__file__).parent.parent.parent / "frontend" / "build"
_frontend_build = Path(__file__).parent.parent / "frontend" / "build"
if _frontend_build.exists():
app.mount("/", StaticFiles(directory=str(_frontend_build), html=True), name="static")
6 changes: 6 additions & 0 deletions tests/test_bdweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@

from bdweb.backend import server

def test_frontend_build_path_is_correct() -> None:
frontend_dir = server._frontend_build.parent

assert frontend_dir.name == "frontend"
assert (frontend_dir / "package.json").is_file()


@pytest.fixture
def client(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Iterator[TestClient]:
Expand Down
Loading