Localhost and Ionic View - angularjs

I am testing in my browser using Ionic Serve and I am also connecting to a RESTful WCF Service running on a Localhost. I want to be able to connect to that service using the Ionic View App. Is it possible to connect to a local host with an external device like using Ionic view app on my device or do I need to host my service differently?

computer and device on same network
goto computer command prompt and run this command ipconfig
you will get internet ip address like e.g:192.168.0.102
now move to your device set http:// 192.168.0.102:yourapilink?parameters=1
please like if answer really helpfull

There are tools available, but most easy way will be this:
Make sure both computer and mobile are on same network.
Run server on localhost, and in client side code replace localhost with the IP address of your system where you are making api calls. For example localhost/api/login with 192.168.1.102/api/login.
Now your mobile will be getting response from server running on your system.

Related

Is there a way to connect NextJS app on my phone trough local network in development like Create React App does?

Create-React-App provides a URL that I can connect through my LAN network like this:
Is there a way to expose the NextJS URL through the LAN network?
The server is accessible on the local network, as long as the network is configured properly (and doesn't have something like client isolation enabled). All you need to do is find out which IP address your network's router is allocating to you. On Windows, this can be done by checking the results of ipconfig. On Linux, you can use ip addr. Then, when you want to access the app from another device, just use the IP found above followed by the port set in next.js.
For example, I have a machine whose network IP address is 192.168.1.2. On that machine, I have a Next app running on port 56381.
ready - started server on 0.0.0.0:56381, url: http://localhost:56381
I can access it on my phone by going to 192.168.1.2:56381.

rails server successfully, but can't access in mobile

Iam able to access rails app in all systems with in network, but unable to access in mobiles.
I started app like below
rails s -b ip
Double check if your mobile is in the same network of your server. You can do this either by pinging your mobile device (if it support ping) or doing a network scan using tools like nmap or take a look at your router to see where is your device. If you want to allow all access, the binding ip should be 0.0.0.0.

connect to local host with my android phone but dont the full angular site

I am using tomcat server and angularJS to build a site that uses an API to bring data from the server by using an HTTP requests. when running on local machine tomcat is on ,i can see the full functionality of the site but when i'm connecting to my localhost from my phone (through WiFi) the site i see is not really functioning ,as if the HTTP requests can't be sent. is there a way to make the site work fully when viewed from my phone ?
note: my site basically uses the API to send a GET request and update a table on screen with the data, and POST/DELETE requests to update,delete,create data and of course dynamically update the table.
i'm working with Windows 7 if it matters.
another note: i used this answer to be able to connect with my phone. maybe i should use another way ?
Thanks
Sivan
why not use https://ngrok.com/ to tunnel your localhost to an private url.
(this is just for mobile testing right?)

Can't reach local GAE server through my ip

I developing an app with GAE as a back-end, when I run GAE server locally I can reach it in the browser through localhost:8888 but when I try to reach from an external device on the same wifi network, with my <my local ip>:8888 I get no response. I was always using this way do debug my apps and back-ends and suddenly it stopped working?
Found the answer at last, add 0.0.0.0 address to the servers run arguments. As described here :
Can access AppEngine SDK sites via local ip-address when localhost works just fine and a MacOSX
https://developers.google.com/appengine/docs/java/tools/devserver#Using_URL_Fetch

Access a website globally which is running nicely in LAN

I have developed an application (website) which is running in LAN nicely.
My application is built using Silverlight and I have published that website in IIS and I can access that application nicely in LAN through following LINK.
http://192.168.137.24/SilverLightBusinessApplicationWeb/SilverLightBusinessApplicationTestPage.html#/Home
Now I require to access that application globally all over the word from any PC through INTERNET so for that, what configuration I have to use?
You may want to redirect your port 80 to LAN IP via router/modem settings.

Resources