I have a web server running at mydomain.com and a Node.js application on a different server which I can get to through 111.111.111.111:8000. I'd like to make this Node.js app available through my domain name, through a subdomain. That is, I want to be able to type in node.mydomain.com and have my traffic sent to 111.111.111.111:8000. I thought this would be an easy job for an A Record, but it seems that I can only change the IP, not the port.
How would I accomplish this? I am assuming that I need to tell the VM running my Node.js application to accept traffic on port 80 and then redirect it to port 8000, but I'm not sure how to do this.
I know this is possible by using Apache or NGINX's ReverseProxy directives, but I'm sure there must be a simpler way through Node or some configuration on the VM.