Have you ever considered sharing your locally deployed project over the internet?
There could be some use cases either for testing or team work when we need to expose our local project over the internet
There could be other options available to achieve the purpose of sharing local project over the internet, but I've been using ngrok.
What is ngrok ?
Ngrok is like a special passage. It connects your local project, normally hidden on your computer, to a public web address on the internet. This lets others visit your project through a simple web link.
It supports multiple protocoles including HTTP,HTTPS and TCP
We need to follow these simple steps to share our project over the internet :
Step 1 :
Set up your project ( API or web app ) on local web server
Step 2 :
Download ngrok as per your operating system ( Windows/Mac)
Step 3 :
Create your account because we need a token to make those calls.
Better to keep shortcut of ngrok on desktop, run it and execute following command.
ngrok config add-authtoken token-goes-here
Step 4 :
Again on ngrok prompt execute following command with port number on which your project is running on local web server.
For example in this snippet I have provided 3234 port number.
./ngrok http 3234
Bingo that’s all you need to do. If everything goes well then you would be able to see a live address on cmd with other details.
Whenever you’re ready, there are 2 ways I can help you:
Promote yourself to 10000+ subscribers by sponsoring this newsletter
Patreon Community: Join and gain access to the 200+ articles I have published so far at one place. Join here