Hi,
I tried to run my dash app with gunicorn, I found that all the js, css and media files under assets directory are not loaded from browser, any suggestion to fix this problem?
Thanks in advance!
Jian
Hi,
I tried to run my dash app with gunicorn, I found that all the js, css and media files under assets directory are not loaded from browser, any suggestion to fix this problem?
Thanks in advance!
Jian
Be sure to include app = dash.Dash(__name__)
, otherwise dash cannot find the directory when you run it thru gunicorn since the path will be wrong (will be /site-package/gunicorn
or something instead of /path/to/project
).
Also, if you are deploying to an external server, make sure the assets folder is included in the build.
Thanks a lot for the tips!
It works fine now.
Jian