Skip to content

Instantly share code, notes, and snippets.

@garretttaco
Last active January 25, 2017 21:08
Show Gist options
  • Save garretttaco/4d787dda08f21f520f251d21d1fc4722 to your computer and use it in GitHub Desktop.
Save garretttaco/4d787dda08f21f520f251d21d1fc4722 to your computer and use it in GitHub Desktop.
View localhost website from another device, with the internal ip address

The setup I am using, is I have a Node.js, express server that is listening on port 1337 using the host 127.0.0.1. I then have Webpack dev server running on port 3000 and it proxies all traffic from 3000 to 1337, the server. Webpack dev server runs as a default on host 127.0.0.1 and for security reasons, other computers internally cannot access any server from that host. As a fix, I had to change the (default) host to 0.0.0.0 in order to then access the internal ip and port (http://192.168.100.54:3000).

References:

http://stackoverflow.com/a/30712750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment