Commit d67b3286 authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

no error when client not built

parent 6b82d022
#!/usr/bin/env python3
import logging
import os
from pathlib import Path
from typing import List
......@@ -26,7 +27,10 @@ app.add_middleware(
allow_headers=["*"],
)
app.mount("/webui", util.SinglePageApplication(directory=Path('client/dist')), name="SPA")
if os.path.exists('client/dist'):
app.mount("/webui", util.SinglePageApplication(directory=Path('client/dist')), name="SPA")
else:
logging.info("/webui cannot be served as client/dist is missing, please build the client.")
@app.get("/")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment