I am not sure if this is a Wappler issue, and hence the question.
I am working on a mobile app which needs to fetch data from a remote server. For testing purposes, the remote server runs on a local machine. Both machines have access to the WiFi router, so they can both access internet.
Is there a way to get the mobile app to access the local server via WiFi without going over to internet?
Hi @tomcat,
You’ll need to have a local webserver up and running and configure port forwarding within your specific router if not already enables. Rather than me re-writing guides its easy enough to find one via a search engine on how to do this. On the Wappler side you will need to have the Project set up to use the local web-server and deploy all your files and database to it. Try to replicate your online environment as best you can, ie run the same PHP and MySQL versions. You may also need to check for any firewall restrictions on your local host to insure the connections can be routed. Shouldn’t be too difficult to figure out, maybe an hour or so if this is your first attempt at doing such a set-up.
You may also have to configure a DMZ on your router. Try a search for your routers manufacturer with DMZ in the search criteria. Usually throws up the answer. Try the above firewall options first though…
Using the windows settings in Networks and Connections
I had to change the network profile from “public network” to “private network” which makes the device discoverable by other machines.
Then selecting the “private network”, I had to turn of the Microsoft Firewall Defender for the private network. This then allowed the PC be visible to other machines, and any request to port 30405 was then redirected to the server running on the PC.
Now I can see the server from another machine. I even tested that from a mobile browser, so that works too.
Thank you very much for your help . This makes my testing a lot easier now.