Port forwarding using ngrok. Get URL for the localhost and use that to access the local server from anywhere. Open the localhost server from smartphones – Android, iOS devices.
To start using ngrok on your windows PC firstly you have to download ngrok for windows.
ngrock windows – Download Links
A zip file will be downloaded, extract the ngrock.exe file, and run that file.
How to use ngrok in windows 11
- Run the ngrok.exe file.
- It will open a terminal window, run the following command to start
ngrok http 3000
- Replace 3000 with your port number
It will start port forwarding and you will receive a URL in the terminal.
Here in the above photo, you can see my custom URL for the localhost server. My port number is 8080. I can use the URL highlighted with white background to access my localhost server from anywhere. It can also be accessed from smartphones – android and iPhone devices.