I have an app running on my computer at 127.0.0.1:3000
I would like to access that app from an iPhone connected to the same network. I have done this before but blanking out on how I did it. Any ideas?
|
I have an app running on my computer at 127.0.0.1:3000 I would like to access that app from an iPhone connected to the same network. I have done this before but blanking out on how I did it. Any ideas?
| |||
|
feedback
|
|
First you need to determine the ip address or name of the machine you are running the webserver on. I'm assuming you are running the webserver on a mac since you tagged your post
If you are unable to connect to your application on the server's real address, that means your application isn't listening on that address. You will need to investigate how to change your application configuration to modify that behavior. Since I don't know what application you are running I can't offer any good ideas on that. | |||
feedback
|
|
Find the name of your Mac using If for some reason Bonjour doesn't work in your environment, find the address of the Airport on an iMac or MacBook with
or in general with
| |||
feedback
|
|
127.0.0.1 is the local address every computer has for itself. You have to find out what the real IP address (or Host/Bonjour name) of the machine is. Go to System Preferences, Network and look up the IP of the machine, either for the Ethernet port if you use a cable or the Airport if you use WLAN . Then open this address together with the :3000 part in Safari on the iPhone. | |||
feedback
|
|
If the application is listening on 127.0.0.1:3000 only then you can't access it from another computer. To do so you would need to modify the configuration to Listen the IP or 0.0.0.0 (all available interfaces).Thats option one. The second option is to use a proxy. Third option is if you can ssh from the iphone you can also use ssh forwarding. ssh user@host -L 3000:127.0.0.1:3000 Then on your iphone open 127.0.0.1:3000 | |||
feedback
|