Created
January 30, 2018 02:22
-
-
Save bergpb/04cd40bc9c57b3cacde6e10cb1f3226c to your computer and use it in GitHub Desktop.
Get ngrok public url in api with node.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Execute with: node ngrok_url_api.js | |
const request = require("request"); | |
const url = "http://127.0.0.1:4040/api/tunnels"; | |
request.get(url, function(error, res, body) { | |
get_url = JSON.parse(body); | |
console.log(get_url.tunnels[0].public_url); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment