I\'m trying to install ngrok (which I\'ve been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I\'ve followed so
add line in .zshrc
# vi .zshrc
alias ngrok="/usr/local/lib/node_modules/node/lib/node_modules/node/lib/node_modules/ngrok/bin/ngrok"
Ngrok can be installed with Yarn , then you can run by power Sheel. it's was the only way that worked for me in windows 10 . In the begin you need to install the Node : https://nodejs.org/en/. and the yarn: https://nodejs.org/en/.
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.
For installation in Windows : Download and extract to any directory (lets say c drive)
Then double click on the extracted ngrok.exe file and you'll be able to see the command prompt.
And just type ngrok http 4040 // here I am exposing [port 4040]
run npm install ngrok --g a very simple way to install