How to set up redirect url for slack authorization with ngrok - express

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

Related

How can I tell Vue where my backend is when accesing through network IP instead of localhost?

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

What is the production url for Ionic 6

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.

NestJS's Server URL cannot be accessed from Ionic App running on phone

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.

How to test file.watch on localhost?

I am displaying the contents of a folder in my AngularJS front-end (with Rails back-end). I want to watch the folder for any changes, such as new file, deleted file.
I obviously want to test the app on my localhost before deploying to a server, but I am not able to add localhost as an allowed domain in the apis console.
How can I set-up file.watch for testing?
Thanks
It's impossible to test push notifications without a verified domain, it's why we cant push confidential information to untrusted endpoints. I'd recommend you to buy/use a test domain/sub-domain for testing.
there's portly.co
worke's really nice , you can verify the domain with google site verification, and add it as a push domain.

Redirect IOS app service calls to different environment services

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.