Broadcast localhost and access from any device

Browsers now do a great job of emulating phones and tables. However, sometimes your client uses a fucking microsoft surface and they say you website sux cuz it’s broken on this device no one uses.

Then you gotta find a friend with a Microsoft Tablet with the exact same Internet Explorer, Operating System and then make the change. So… you may need to broadcast your local dev so that other devices connected to the internet can use them!

I use ngrok. Installing it was a pain in the ass, so I won’t go over that, even though that would be beneficial. This is the command to install it with homebrew.

$ brew cask install ngrok

You may receive an error that cask doesn’t exist. I’ll let you chase that rabbit hole, but you can install cask with brew or taproom.

$ ngrok http

$ ngrok http localhost:4000

Then it will provide a url that you can access.

Forwarding -> localhost:4000

Now you can access it with any device, pretty damn cool.

Post Content