I just started an ionic app and dev spins up http:localhost:8081. I will be hitting an api that needs to whitelist the apps url. What will that be? https:localhost:8081?
You most likely need to whitelist the IP adress of the app. Which is going to change depending on the phone it is installed on.
For your usecase you most likely want to have a server communicating with both the app and api so you can use it's IP address to whitelist.
Related
I have an express app running inside an electron app using http on port 6001 and used ngrok to connect to that port. My question is how can I set the redirect url in Slack's dashboard without knowing the first part of the url i.e https://xxxx.ngrok.io. Also, I'm planning to distribute my electron app, what happens when multiple users run the application?
If you are running your Express App locally and exposing that to Slack using ngrok, then it must be for development only.
Using the ngrok free version, your endpoint will keep on changing every time you restart your desktop.
For development -> Update the Slack webhook with the new ngrok URL everytime it changes.
For production -> Deploy your Express app to a cloud based runtime and then expose that IP address as the URL for the Slack webhook
I have the following setup: Vue is running on localhost:8080 as an SPA, and Laravel backend is running on localhost:80 as an API Rest. Now everything on my pc works perfectly fine.
But when I try to view my localhost web app on my phone through the network IP, Vue is not connecting to the backend correctly. I access to the frontend on my phone with my network IP 192.168.1.38:8080
I do see my vue SPA but it is not retrieving data from the backend. I have set up the backend URL through a env file on my vue project: VUE_APP_API_URL=http://localhost:80/api
I set up a laravel route so that I can check the status of the API, if i go to 192.168.1.38:80/api/status in my phone I can see it works perfectly fine. Could the problem vue on my phone is calling the backend on http://localhost:80 instead of 192.168.1.38:80 ?
If that is the case, how can I tell my vue project to dynamically change the backend URL, to localhost:80/api when on my pc and to 192.168.1.38:80 on my phone?
I'm a bit lost here, thank you in advance.
Yes you are correct. You need to set your api url as the IP address in your vue app i.e. 192.168.1.38:80/api/...
you could potentially use some javascript to check if your on a mobile device and change the url dynamically but the IP i believe should work both on local and from the mobile device
I have a NestJS server and Ionic app. During development, these two apps do not have any errors when communicating with each other. Deployed my Ionic app to my phone, but now it doesn't communicate with my server upon testing. I have my NestJS's server URL set as http://<myLaptopIP>:3000 on my Ionic app. I also tried accessing that URL from my phone's browser, but it also doesn't work. I already have CORS enabled in my NestJS app with default configurations, so I'm not sure where the problem is.
My iPad app is developed by third party and it is calling my restful services for registration and login.
Now I want to launch iPad app from XCode project which is pointing to old service URLs and redirect service calls to invoke new service URLs without modifying the code.
Ex: login request coming to http://xx.com/login and redirect to http://xx.com/services/login by interpreting some tool.
Please advice me or let me know if there is any better approach.
http://www.charlesproxy.com/ is what you want. This lets you breakpoint, forward, and do any kind of crazy stuff with your requests. Install on your mac, put it in the same wifi as your phone, and use your mac's ip as proxy.
I used MapRemote to redirect the url in Charles.
Had set Map from and Map to columns.
I want to run my code on web server which will track an iPhone's physical location (using mobile number of card inside iPhone).
How can I do that? Is coreLocation the API that gives that facility?
Your app will have to use CoreLocation to push requests to your web server with the location. The web server cannot pull the location. I do not think you can access the phone number, but you can get the Device ID.
You can get the phone's location in the browser using javascript, please see the answer at question 10567617 .
If you have the location in the browser, you could send it to your server with ajax or any traditional technique.
If you mean, through a regular web request across HTTP, you can't -- that information isn't transmitted for good reasons. However, if you were to create an App that connected to your server's app, then yes, you could simply send the update as a packet to the server as you then have unlimited access to your phones details.