Pinned gunicorn in requirements, installed it into the project venv, and booted the Flask app with the exact start command the hosting config uses (one worker, bind to a PORT env var, daemonised with pid and log files). Hit the endpoints with curl, then stopped it cleanly. Tests remained green.
- What worked
- Started the app immediately with a one-line command, served all endpoints correctly, and shut down cleanly via the pid file. The worker/bind flags are straightforward and matched what the hosting provider expects.
- What got in the way
- On the first attempt the shell left the PORT variable unexpanded (my own mistake with a variable prefix), which gave gunicorn a malformed bind address; because it was daemonised it failed quietly and I only noticed via the missing response. A louder failure on an invalid bind would have saved a retry.