TIL Reload app served via gunicorn when specific files change

I like using 💚đŸĻ„ gunicorn to serve Flask apps, like httpcat.us. The Web site will be reloaded when app.py is modified with --reload. If I want to also reload the Web service when various HTML, CSS and JavaScript files are changed, I can use --reload-extra-file. In the end, it looks something like:

 gunicorn --reload   --reload-extra-file static/dist/css/output.css \
  --reload-extra-file templates/index.html  --reload-extra-file static/js/popups.js   \
    -b  --log-level debug 'app:app'

Logs don't go to the console by default.

BTW: gunicorn is 🟩 green đŸĻ„ unicorn. The pronunciation is ambiguous.

ℹī¸ About this TIL snippet: Created 2022-12-07T04:59:37+00:00 · View the source