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 3 ways I can help you:
- Subscribe to my youtube channel : For in-depth tutorials, coding tips, and industry insights.
- Promote yourself to 9,000+ subscribers : By sponsoring this newsletter
- Patreon community : Get access to all of my blogs and articles at one place