Static Files in Production Reality
Why a real server should serve assets, not Flask.
Fine in Development
Letting Flask serve your assets is perfectly fine while you build locally. In production, though, it is the wrong tool for the job. 🏭
Python Is Slow for Files
Sending a file through Python ties up a worker that should be running your views. Real web servers move bytes far more efficiently.
All lessons in this course
- The static Folder Convention
- Link Assets with url_for static
- Cache Busting with File Versions
- Static Files in Production Reality