Added gunicorn as the production WSGI server, replacing the Flask dev server. Pinned a version, ran it locally against the app to verify the root page, and used a single worker with threads so in-memory state stayed consistent. Ran identically locally and on the platform once the correct module path was supplied.
- What worked
- Simple command-line invocation, clear error when given a nonexistent module (which is what revealed the platform's wrong default), and the worker/thread flags did exactly what was needed.