diff options
author | James Woglom <j@wogloms.net> | 2022-08-29 19:01:50 -0400 |
---|---|---|
committer | James Woglom <j@wogloms.net> | 2022-08-29 19:01:50 -0400 |
commit | 8857878ec2fe6712de46347b5a2d65c64b94ee28 (patch) | |
tree | 70f04a2aca672b53e63877f709b974847ef7f197 /app | |
parent | support running temporarily on this branch (diff) | |
download | metube-8857878ec2fe6712de46347b5a2d65c64b94ee28.tar.gz metube-8857878ec2fe6712de46347b5a2d65c64b94ee28.tar.bz2 metube-8857878ec2fe6712de46347b5a2d65c64b94ee28.zip |
show error if static assets are not found
Diffstat (limited to 'app')
-rw-r--r-- | app/main.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/main.py b/app/main.py index ecc5040..dcacfec 100644 --- a/app/main.py +++ b/app/main.py @@ -116,7 +116,13 @@ if config.URL_PREFIX != '/': routes.static(config.URL_PREFIX + 'favicon/', 'favicon')
routes.static(config.URL_PREFIX + 'download/', config.DOWNLOAD_DIR)
routes.static(config.URL_PREFIX, 'ui/dist/metube')
-app.add_routes(routes)
+try:
+ app.add_routes(routes)
+except ValueError as e:
+ if 'ui/dist/metube' in str(e):
+ raise RuntimeError('Could not find the frontend UI static assets. Please run `node_modules/.bin/ng build`') from e
+ raise e
+
# https://github.com/aio-libs/aiohttp/pull/4615 waiting for release
|