How to serve static files in Flask

The preferred method is to use NGINX or another web server to serve static files; they’ll be able to do it more efficiently than Flask. However, you can use send_from_directory to send files from a directory, which can be pretty convenient in some situations: Alternatively, you could use app.send_file or app.send_static_file, but this is highly … Read more