Hello devs, I got introduced to a tool that allows you to expose a web server running on your local machine to the internet. Its ngrok
Setup
Go to Ngrok Link to signup and download the ngrok for your operating system
Let's say for example you are working on a node app running on http://localhost:3000
and you want to expose/share your server to a colleague without using ipconfig.
Then type the following command
ngrok http <your port number>
In my case ngrok http 3000
You should get something like this
π― Copy the forwarding link highlighted in red and test on any browser. (Okay, the moment of truth, what did you get? π)
Password protect your tunnel
ngrok http -auth="username:password" 8080
In my case, it will be
ngrok http -auth="drsimple:ngrokpassword" 3000
Open the ngrok terminal and paste the above command.
copy the forwarding link and paste it into your browser.
π― Lastly, let us look at how we can run ngrok in our command prompt in few steps
Copy the path where you downloaded ngrok
π― Go to the environment variable
Click on the path, Click Edit, New, and Paste the path copied earlier.
Repeat the above step for the system variable.
π― Your command prompt should be able to run ngrok successfully.
π¨π½βπ« For further customization check the recommended video and the ngrok docs.
I hope this was helpful. Thanks ππ½ for reading.
drsimplegraffiti / drsimplegraffiti
Config files for my GitHub profile.
Hi π, I'm Abayomi.
A Software Engineer interested in Backend
Software Engineer
-
π I regularly write articles on https://dev.to/drsimplegraffiti
-
π My Portfolio Click Here
-
π« How to reach me abayomiogunnusi@gmail.com
-
π Know about my experiences https://www.linkedin.com/in/abayomi-ogunnusi-974826141/
Languages and Tools:
Dev.to Post
π Improve your Github Profile
π Download Browser Page as PDF
π Expose a local web server to the internet
π Web scraping using Node Js
π Bash Terminal Guide
π Best Practices: Node JS Security
π Postman Hacks
π Time Zone: Nodejs
Reference
ngrok docs
Reference Video by CyberRyker
Top comments (2)
@nqrz ...Glad it was helpful
omg, this is amazing!