Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Connect to Node.js Express from iPad

Posted on 2016-08-06
1
Medium Priority
?
277 Views
Last Modified: 2016-08-07
I am developing an Ionic application for iPad. The app is supposed to connect to Express running on Mac.

I have connected the iPad with this Mac using a usb cable. Now, in order to check that I can access node server from iPad, I am doing the following in Chrome on iPad

http://<mac ip>:<node server port>

How, this returns a page not found. The same url works when I run it directly on the Mac.

Given the Mac and iPad are connected by the usb, how can I access node server running on mac from iPad? I was hoping that something like http://127.0.0.1:3000 would work, but that is not the case. Even giving the IP of Mac does not work.
0
Comment
Question by:ank5
1 Comment
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 41745780
First, connecting by 'http' means going over the network.  And unless your USB is your network, that isn't going to work.  Both the iPad and the Mac need to be on your network to make this connection.

And http://127.0.0.1:3000 will Only connect to the computer or device that it is on because that is the 'localhost' IP.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ensuring effective and secure communication in the age of healthcare BYOD.
A professional opinion on which Apple product to buy, and a tidbit about the WWDC.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question