The script creates two servers, one on localhost:3000 and another on port 3020.
You can use app1
to proxy a request to app2
(or any other server):
curl localhost:3000/proxy/localhost:3020/health
The app2
is just for example purposes. You should be able to proxy requests to anywhere:
curl http://localhost:3000/proxy/jsonplaceholder.typicode.com/posts