ngrok-tunnel
ngrok-tunnel copied to clipboard
Add support for leaving an ngrok process open and reusing an existing ngrok process instead of starting a new one on every process.
I needed my ngrok process to persist across multiple Ruby processes so that I could test web service callbacks in a multiprocess environment without a constantly changing ngrok hostname.
On initial start, it saves the details of the running process to a file. On subsequent starts, it then reads that file, verifies that the process still running, and then uses it instead of running a new process.
@scottmartinnet You may want to require 'json'
.