I used Flask assets in my project to combine all js and css files. Its working perfectly.
assets = Environment(app)
js = Bundle('js/jquery/jquery.js','js/owl.carousel.min.js',output='gen/packed.js')
assets.register('js_all', js)
css = Bundle('css/bootstrap.css','css/font-awesome.css','css/color.css',output='gen/packed.css')
assets.register('css_all', css)
Now i want to set expire days on static files. I checked the URL expiry part in doc. But i am confused. I want to set 30 days as expire. How can i achieve that goal using flask assets.
There is no way to do this with Flask assets directly. It is just an asset bundler and does not control serving the final files.
However I am presuming you are running your app behind a web server like Nginx or Apache (if you're not - you should be).
Setting the expiry time with one of these is simple in the config.
Nginx
Apache (taken from this answer)