Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Statistical-Genetics
jass
Commits
d67b3286
Commit
d67b3286
authored
Apr 07, 2022
by
Bryan BRANCOTTE
Browse files
no error when client not built
parent
6b82d022
Changes
1
Hide whitespace changes
Inline
Side-by-side
jass/server.py
View file @
d67b3286
#!/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
(
"/"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment