Share My Creation Creating My Own DDNS Solution

1631183917391.png
1631191042646.png


Introduction
There are times we want to demonstrate to our client about the app we have developed which requires to connect to a MS SQL Server. Windows hosting server is usually not cheap. So what we can do is temporary transform our local PC into a public server. The problem is we are using dynamic IP address assigned by our ISP. This can be solved by using Dynamic DNS service like duckdns or no-ip. There are limitation with the free services and I don't want to register an account with these providers. If you are using Laragon as a development server, you may know that there is a hidden gem call ngrok that can do the job. However, the URL is randomly generated. It is cumbersome to update the URL inside the app and recompile it every time the URL is changed.

My solution
So I want to host my local JRDC server or API web service to allow public access from mobile devices (Android or iOS) or desktop PC on external network.
First, I will run this API server which serve on port 3000 (for example). I run the command "ngrok http 3000" to transform my PC into a public server.
Second, I create a "Link Updater" app in B4J to update this Public Address into the database in a shared hosting server (running LAMP).
Third, my client app will connect to my shared hosting web service to retrieve the Public Address and use this URL to connect to my local PC.

So far this solution works very well. What do you think? Is it too complicated or you have better suggestions?

Update: Source code available as donationware (minimum USD 20)
The project includes:

1. PHP MVC web services
2. B4J Server project
3. B4J Link Editor project
4. B4X Client demo project (B4A, B4J, B4i)
5. MySQL script
6. MS SQL Server script
7. User Manual guide text file
 
Last edited:

aeric

Expert
Licensed User
Project Source Code available as donationware (minimum USD 20)

The project includes:

1. PHP MVC web services
2. B4J Server project
3. B4J Link Editor project
4. B4X Client demo project (B4A, B4J, B4i)
5. MySQL script
6. MS SQL Server script
7. User Manual guide text file
 
Top