Not sure about charles.app, but if you're able to configure Nginx locally, then this should work:
upstream myservice {
server 127.0.0.1:8000;
}
server {
listen 8001;
server_name 127.0.0.1;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_pass http://myservice;
}
}
This assumes your server is listening on 127.0.0.1:8000. To connect through the proxy, go to 127.0.0.1:8001.