ngrok: Expose a local web server to the internet

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 examp…


This content originally appeared on DEV Community and was authored by Abayomi Ogunnusi

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
exposed secret

Setup

Go to Ngrok Link to signup and download the ngrok for your operating system
ngrok1

ngrok 5

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.

? Launch the ngrok
ngrok2

Then type the following command

ngrok http <your port number>

In my case ngrok http 3000

You should get something like this
ngrok4

? Copy the forwarding link highlighted in red and test on any browser. (Okay, the moment of truth, what did you get? ?)
ngrok 4

Password protect your tunnel

ngrok http -auth="username:password" 8080

In my case, it will be
ngrok http -auth="drsimple:ngrokpassword" 3000
ngrok 6
Open the ngrok terminal and paste the above command.
copy the forwarding link and paste it into your browser.

This time you get:
ngrok 7

? Lastly, let us look at how we can run ngrok in our command prompt in few steps
Copy the path where you downloaded ngrok

ngrok 8
? Go to the environment variable
ngrok 9
Click on the path, Click Edit, New, and Paste the path copied earlier.
ngrok 11
Repeat the above step for the system variable.

? Your command prompt should be able to run ngrok successfully.
ngrok 13

??‍? For further customization check the recommended video and the ngrok docs.

I hope this was helpful. Thanks ?? for reading.

GitHub logo drsimplegraffiti / drsimplegraffiti

Config files for my GitHub profile.

Calm Developer

Hi ?, I'm Abayomi

A passionate Web developer from Nigeria

drsimplegraffiti

drsimplegraffiti

drsimplegraffi1

  • ? I’m currently learning Backend Node Js

Connect with me:

drsimplegraffiti drsimplegraffi1 15661401 drsimplegraffiti @drsimplegraffiti

Languages and Tools:

bootstrap css3 express git heroku html5 illustrator javascript mongodb nodejs photoshop postman react sass xd materialize mocha

Support:

drsimplegraffiti



drsimplegraffiti

 drsimplegraffiti

drsimplegraffiti

Dev.to Post

? Improve your Github Profile

? Download Browser Page as PDF

? Send mails using NodeJS

? Chat App using Socket.io

Reference

ngrok docs
Reference Video by CyberRyker


This content originally appeared on DEV Community and was authored by Abayomi Ogunnusi


Print Share Comment Cite Upload Translate Updates
APA

Abayomi Ogunnusi | Sciencx (2021-09-29T00:26:01+00:00) ngrok: Expose a local web server to the internet. Retrieved from https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/

MLA
" » ngrok: Expose a local web server to the internet." Abayomi Ogunnusi | Sciencx - Wednesday September 29, 2021, https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/
HARVARD
Abayomi Ogunnusi | Sciencx Wednesday September 29, 2021 » ngrok: Expose a local web server to the internet., viewed ,<https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/>
VANCOUVER
Abayomi Ogunnusi | Sciencx - » ngrok: Expose a local web server to the internet. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/
CHICAGO
" » ngrok: Expose a local web server to the internet." Abayomi Ogunnusi | Sciencx - Accessed . https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/
IEEE
" » ngrok: Expose a local web server to the internet." Abayomi Ogunnusi | Sciencx [Online]. Available: https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/. [Accessed: ]
rf:citation
» ngrok: Expose a local web server to the internet | Abayomi Ogunnusi | Sciencx | https://www.scien.cx/2021/09/29/ngrok-expose-a-local-web-server-to-the-internet/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.