Local Setup (Works Perfectly)
Django runs on 127.0.0.1:8000.
proxy.js runs on 127.0.0.1:3000.
Everything works smoothly — requests are routed properly through the proxy.js server to the Django backend.
Heroku Deployment (Fails)
On Heroku, both Django and proxy.js must run on the same web dyno. Heroku assigns a single dynamic $PORT for the dyno, and this is where things break:
Gunicorn binds to $PORT (this works).
proxy.js tries to bind to 3000 (or another static port) and fails because Heroku doesn't allow multiple ports per dyno.
I’ve tried making proxy.js bind to $PORT instead, but then Django and proxy.js conflict because both try to use the same port.