title: routing subdomains to a specific port in nodejs
body: <p>I have two react frontend servers (example1 and example2) listening on two ports on MyDomain.com:
  MyDomain.com:4000 accesses example1
  MyDomain.com:5000 accesses example2</p>
  <p>I have two subdomains, example1.MyDomain.com example2.MyDomain.com
  I want to create a third nodejs server that will listen on port say 3000 and route requests to ports 4000 and 5000 depending on the subdomain accessed.
  example1.MyDomain.com will be routed to MyDomain.com:4000
  and
  example2.MyDomain.com will be routed to MyDomain.com:5000</p>
  <p>could not find an example that addresses port numbers except for ngnix
  I also tried using proxy middleware but the examples show how to route according to the suffix after the .com and that is not what I need.
  Thanks for any help,
  Amnon</p>