Use Ctrl+C to stop ngrok and sharing.
If you get something like "'ngrok' is not recognized" it probably means you don't have the folder containing ngrok.exe in your PATH environment variable. You may also need to open a new command window. Once you've got ngrok installed, it's time to make use of it with your Visual Studio projects.
Start command reference start starts the tunnel by name from the config file. The Ngrok start command Runs tunnels by name from a config file. You can specify any number of tunnel names. You can start all tunnels from the configuration file by specifying the –all switch.
Short answer: Put the executable file in /usr/local/bin
instead of applications. You should now be able to run commands like ngrok http 80
.
Long answer: When you type commands like ngrok
in the terminal, Macs (and other Unix OSs) look for these programs in the folders specified in your PATH
. The PATH
is a list of folders that's specified by each user. To check your path, open the terminal and type: echo $PATH
.
You'll see output that looks something like: /usr/local/bin:/usr/bin:/bin
. This is a :
separated list of folders.
So when you type ngrok
in the terminal, your Mac will look for this executable in the following folders: /usr/local/bin
, /usr/bin/
and /bin
.
Read this post if you are interested in learning about why you should prefer usr/local/bin
over other folders.
With Homebrew already installed on your Mac, you can easily install ngrok from the terminal, using this command:
$ brew cask install ngrok
Then run it from the shell using this command:
$ ngrok http 8000
With this command, you're telling ngrok to basically create a tunnel to your localhost 8000 and assign an internet name host for it. And thats it. You should be good to go.
Execute the following command into the terminal :
sudo cp ngrok /usr/local/bin
Now your ngrok execuatable file is successfully copied to the /usr/local/bin directory. Now you are able to run the ngrok command in the terminal
I have also faced this issue on my MacOS, I used these simple steps and it worked for me.
Just open the terminal and go to your project folder where you what to start ngrok and then unzip downloaded file.
$ unzip /path/to/ngrok.zip
After doing this you don't need to authenticate ngrok, just run this command:
./ngrok http 80
It should work now.
This is how I got it to work..
For Mac
For Windows 10 bash:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With