There are plenty of use-cases where you want your local machine to be available from the internet, without setting up port forwarding on your router. One easy way to enable this is remote port forwarding.

To tunnel requests to yourdomain.com:8080 to your localhost:3000, you would set it up like this (assuming Ubuntu):

  1. On server, put GatewaysPorts yes in the /etc/ssh/sshd_config
  2. On the server, run service ssh restart
  3. On your local machine, run ssh -R 8080:localhost:3000 user@server