You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to serve staticfiles with flask-assets in development and production using gulp?
I'm currently using gulp.watch to build my css/font/js etc inside a build folder to later be served via nginx.
How can I use flask-assets to serve the it properly in nginx and development?
This is how I've been serving the files in nginx
# serve static files - each entry is a separate folder
location ~ ^/(img|js|css)/ {
alias /home/XXXXX/www/myapp/myapp/static/build;
autoindex on;
add_header Cache-Control "public";
expires 30d;
}
The following is how I've been serving staticfiles in my development
Problem here is that it requires me to go into the build/ folder instead of maintaining it similar to production using nginx.
How do I make a shortcut or link for static so that it recognizes that it should only look at the build/ folder level instead of the higher static folder?
Let me know if you have any tips or if Flask-Assets can help me solve this problem. Thanks!
How to serve staticfiles with flask-assets in development and production using gulp?
I'm currently using gulp.watch to build my css/font/js etc inside a build folder to later be served via nginx.
How can I use flask-assets to serve the it properly in nginx and development?
This is how I've been serving the files in nginx
The following is how I've been serving staticfiles in my development
My only problem is that when I am serving on nginx... I have to remove the
build
part of the url for almost everything... This causes confusion.I 'm looking into flask-assets to see if there is a better solution.
Thanks!
The text was updated successfully, but these errors were encountered: