siteleaf / siteleaf-gem

Command-line interface (CLI) and Ruby interface for the Siteleaf API
http://siteleaf.com
MIT License
77 stars 11 forks source link

Accessing localhost:9292 from device #37

Closed themeteorchef closed 8 years ago

themeteorchef commented 9 years ago

This is less of an issue and more of a note for others.

I've been attempting to access my Siteleaf server on port 9292 from my iPhone and couldn't. I ran into this issue with a Rails app running a Puma server (what Siteleaf is running on) recently, and had to run rails s --binding=0.0.0.0 so I could access from my local IP address.

It looks like the same issue occurs here, but instead, from my project directory I need to run puma -b tcp://0.0.0.0:9292. As I understand it, setting the IP to 0.0.0.0 allows incoming connections for ANY IP address on the specified port.

Now, I can open up Safari on my phone and go to http://192.168.1.130:9292 and access the site as expected. Note: 192.168.1.130 is this just the IP for my local machine so yours will be different.

Hopefully this helps others who get stuck!

grantmccall commented 8 years ago

You sir, are a champion.