Created
May 17, 2017 01:10
-
-
Save rch850/219f7a6866429513aab20cdbb4683028 to your computer and use it in GitHub Desktop.
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
const http = require('http') | |
const spawn = require('child_process').spawn | |
http.get('http://localhost:4040/api/tunnels', res => { | |
let rawData = '' | |
res.on('data', chunk => { rawData += chunk; }) | |
res.on('end', () => { | |
JSON.parse(rawData).tunnels | |
.filter(t => t.proto === 'https') | |
.forEach(t => { spawn('open', [t.public_url]) }) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment