diff --git a/run.py b/run.py index e0d938d..975765e 100644 --- a/run.py +++ b/run.py @@ -1,5 +1,6 @@ import logging import sqlite3 +from os.path import isdir import aiohttp from sanic import Sanic, response @@ -60,7 +61,8 @@ async def _handle_exc(request, exception): if __name__ == '__main__': - app.static('/', './priv/frontend/build') - app.static('/', './priv/frontend/build/index.html') + if isdir('./priv/frontend/build'): + app.static('/', './priv/frontend/build') + app.static('/', './priv/frontend/build/index.html') app.run(port=config.PORT, host='0.0.0.0')