About the App
- App name: ngrok
- App description: Expose localhost to the internet and capture traffic for replay
- App website: https://ngrok.com
Install the App
Brew Ngrok
- Press
Command+Space
and type Terminal and press enter/return key. - Run in Terminal app:
ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)' < /dev/null 2> /dev/null
and press enter/return key.
If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish. - Run:
brew install ngrok
$ 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. ./ngrok 3000 If you put ngrok in your path or installed with brew you won’t need the ‘./’, and you must replace the ‘3000’ with the port that your local server is listening on. You’ll see ngrok start up, and it will display some relevant info, including a request log and the URL you need for mobile testing. Secure introspectable tunnels to localhost. 1 2 3: brew cask install ngrok ngrok http 8080: Servo. Ngrok is a cool service for creating public URLs of the local sites. This service comes handy when we want to share our local work to remote customers. Sometimes the developer needs this for the testing local site in different devices. Following are the steps to install ngrok in Mac.
Done! You can now use ngrok
.
Similar Software for Mac
ngrok is an awesome service – it creates secure tunnels to localhost. Zen den. With ngrok, you get a url like http://459387bb.ngrok.com which is actually tunnel to a port to your local machine. So any request you make to that url is served by the app that you run on that port.
I know there are many cool services to debug webhooks like Requestbin – but the main benefit of ngrok is the app keeps running on your app, serving live traffic. So you can debug it in real time.
Install Ngrok
In this blog post, we would use a Node.js server with ngrok to serve Mandrill webhook requests.
Todoist has revolutionized the way we run our small business by helping us simplify projects and coordinate tons of details. Use Todoist with your calendar With calendar feeds you can see all your scheduled Todoist tasks inside your favorite calendar app: Google Calendar, Apple Calendar, Outlook Calendar, and any other calendar that allows you to subscribe with a URL feed. Meeting Agenda - Template Todoist The first rule of making meetings more productive is to ask yourself whether you need to have them in the first place. For the ones that can’t be replaced.
Installing ngrok
Downloading and installing ngrok is pretty easy as you can find here — https://ngrok.com/download. However, if you’re on OS X and use Homebrew, you can install it with just one command:
Creating a Node.js App
Here’s a sample Node app that listens on port 3000 and parses the mandrill payload using body-parser
package.
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 | varbodyParser=require('body-parser'); varapp=express(); //----> Middlewares extended:false app.get('/',(req,res)=>{ }); // Mandrill webhook varpayload=req.body['mandrill_events']; varevent=item['event']; vardoc={ 'email':email // Do some more processing }); res.send('OK'); //----> Run the server varhost=server.address().address; console.log('App listening at http://%s:%s',host,port); |
Tunneling Traffic
Ngrok Mac
Once we have the app running on port 3K, we can ask ngrok to create a tunnel for us. For this we just need to pass the port number to the ngrok
command:
Download Ngrok
We would get an url soon afterwards. We can use this url to POST requests. In our case, go to your Mandrill account and create a webhook. Mandrill will send events to this url and it will be served by your app, running locally on your machine. You can make changes to the codes and restart anytime.
– Minhyun has an older sister named Hwang Sujin – He ended PD101 on the 9th rank with a total of 862,719 votes – Personality: Conservative, with sharp and intellectual charm – He is a member of NU’EST and the only of the four members who participated in. Hwang minhyun age. Share your videos with friends, family, and the world. 3.3m Followers, 14 Following, 485 Posts - See Instagram photos and videos from 황민현 (@optimushwang).
Awesome, no?