Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get ngrok public url in api with node.
//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