Tos Web Developer provides insights, tutorials, and advice around topics including content strategy, design, Drupal Development, Drupal Custom Module Development, Drupal 8 Custom themes, PHP, Server, Twig, and more

Have you ever wanted to expose a local server to the entire internet? It may sound scary but can be really useful. Use-cases are infinite, here are a few:


  • You are developing a web application on your computer and you need to see instantly your modifications on a specific device or browser (smartphone, tablet, internet explorer...) without deploying it again and again.
  • You need to download some files from a coworker computer and you're far from him, or simply don't want to bother with a USB key.
Multiple solutions exist, open-source or not but my favorite is ngrok and you can learn to use it in just 2 minutes. Installation is quite easy, head over to https://ngrok.com/download and follow instructions.

How to install ngrok and Access to The world localhost project using ngrok.

For Windows User Simply Download 
https://ngrok.com/download  for windows set up and unzip the file and open ngrok.exe file once open it will open the terminal. like the below screenshot.


ngrok terminal ss


Above Screenshot showing ngrok is install on your computer successfully it will show version, example, name, Description of regarding ngrok it means you install ngrok sucessfully.

The next step is you have connected your localhost with ngrok for access all over the work.
 
(Note we are using free service of ngrok it has been some limitation you can check the following screenshot you must have to remember those point)




For quick demos and other simple tunneling needs.

  • HTTP/TCP tunnels on random URLs/ports
  • 1 online ngrok process
  • 4 tunnels/ngrok process
  • 40 connections/minute
The Next Step to how to access localhost project to the world 

ngrok http 81

It's simple, just type like above on your open terminal via ngrok. 

I have type 81 because of my localhost URL is http://localhost:81/  port is 81
you can change according to your localhost port e.g 8000 otherwise by default port  is 80 if your local server URL is just 
http://localhost/

once run ngrok http 81 After a few seconds, ngrok will output a few pieces of information, the most important one being "Forwarding": You now have a unique public URL bound to your local server. Paste it, share it, anyone can use it.

you will get below screen you can check out on the below screenshot.



Copy Forwarding link and add the folder of your project above link and share with your colleague and client you check other real-life uses and benefits of ngrok follow below the point.

  • Making bugfix easier on mobile devices
  • Download a large file from a remote coworker's computer e.g. add the file in htdocs folder and copy the name of the file and mention forwarding URL after your colleague and essay download your file easily. 
Any other use-case comes to your mind? Please feel free to tell us in the comment section.

 

No comments:

Post a Comment

| Designed And Blog Post by www.toswebdeveloper.com