How to access to a local domain -which is used in a mobile app- from iPhone on testing phase? - iphone

I have been working on a NativeScript project that uses an API. The API project is on my MacBook and haven't deployed to anywhere yet. It's based on Laravel and I use Laravel Valet as development environment.
I can't test the mobile app on iPhone because the app can't connect to local API URL. I know Valet has "share" command, but because the API consumes another API -which has IP restrictions-, it doesn't work for me. Sharing a local domain via Valet's share command is something like a proxy as I understand, so the consumed API doesn't work on that proxy.
I also checked articles about how to share Macbook's network with iPhone, but it only shares the same network. I can't access the local API still.
Is there any other way that can resolve my issue? Maybe a Docker based solution? I am not that good at Docker, but I can give a try if it is possible with it.

https://ngrok.com/ will happily expose your local Laravel Valet server.
Looks like there's a bit of a walk through on that here too https://mannyisles.com/using-laravel-valet-and-ngrok/ which may help?

Related

Deploy Sveltekit on own Windows/Linux Server?

I am almost done with my first Test Sveltekit Application and want deploy the App in the next Days in my private Network. When I google for this I get flooded with "Deploy to Vercel, Netlify.... and so on" but I dont see much for deploying it the Application to an Server.
Can somebody explain what to do? The Application uses Endpoints.
You would likely want to run it through a Node server, for this you can use the adapter-node package, see the documentation for it for more information.
https://github.com/sveltejs/kit/tree/master/packages/adapter-node

Use external mongodb in mobile build of Meteor

I've seen in a lot of places that in order to use an External Mongodb in Meteor applications, you should use an Environment Variable MONGO_URL. However, I'm building my application to work both as web app and mobile app (by generating an apk).
The problem is that when I start meteor as MONGO_URL='mongodb://user:pwd#path.mlab.com:9999/db' meteor it works well in my computer. But, it's not possible (I haven't found any way of doing so yet) to do this in mobile.
So, anyone has any idea of how I could use an external mongodb in mobile applications?
Thanks!
It seems to me that you are confused about how Meteor works, and more generally the client-server architecture.
Only your server has access to your database (whether on the same machine or at a third party provider), so that you keep control of exactly what your Client has access to.
By "Client", we mean what your visitor uses to access your app, whether a web app through a browser, or a mobile app through a Cordova wrapper.
So your mobile app only needs to know the URL of the server it has to connect to. That is specified by the --server option when you do your meteor build.
Then your server needs to know how to access the external MongoDB. This is your MONGO_URL environment variable. In production, you would set this variable on your server host. Each provider offers a different method to configure those environment variables, most of the time there is a graphical administration panel.
Note that the way Meteor works, you can use the same server to support both your web app and mobile app at the same time.
Finally, you can also test on mobile using meteor run android instead of just meteor (or with ios instead of Android, but you need a Mac). Of course you can still specify your MONGO_URL variable in the CLI when testing, exactly like you have done when testing on browser.
For mobile (cordova) meteor applications think of the app as just a web view with the ability to access native device features (camera, bluetooth ...). Since the application is basically a web view, the underlying mongodb associated with it is the same. If you want mobile device specific storage take a look at GroundDB
For your situation, if sounds like your mobile app is having problems connecting to your server, ultimately not allowing it to pull data from the mongoDB. Make sure that when you build the mobile application you have server specifed '--mobile-server'. Also if you are running it locally, make sure your mobile device is on the same network as your computer and any firewalls that might not allow connections are disabled.

How could I get code of the application deployed on digital ocean?

I need to edit application developed by somebody else in Meteor.js deployed on Digitalocean. I have an access to digitalocean account, but have no idea how to access code and the whole folder where is application stored. Is this even possible ? Should I ask him for github repo with the app to get it instead ? Thanks.
Ask for the repo. The server may only contain the built version of the app (since that's all that's needed to run it) and that's no good for developing. You can't edit that directly.

Dev Environment Facebook Graph API

I have doubts about how could I create objects, actions and aggregation and test it on development environment. Since facebook needs to scrap my webpage to get the object when i register an action. How could I configure my dev environment?
I've had my network guys poke a hole in the firewall to my dev server and have updated DNS point my development subdomain (ie dev.domain.tld).

Local Facebook App Development using localhost

Is it possible to develop facebook apps locally on my system so that the callback URL need not be a public URL like http://abc.com and instead can be an internal IP address like localhost http://127.0.0.1?
It is now possible to develop Facebook apps locally.
I believe this is true especially if you're developing in an iframe, which is now the standard way of developing facebook apps (FBML is deprecated).
In case this does not work, there are still some ways to make working more convenient.
Take a look at this answer:
Testing FB apps is still a rather primitive process.
I generally setup a test application that is a complete copy of the production settings inside the FB development environment that uses an SSH tunnel to point to my development server. You can setup as many applications as you need inside FB - I generally have a development application, a staging app and production. Staging and Production are both on "live" servers rather than an SSH tunnel.
The rest of the answers to this question detail different workflows that people have utilized to make it more convenient to develop on a remote host.
you can use http://127.0.0.1/ProjectName as the callback url, or your ip address itself