Packages

A wrapper around Ngrok providing a secure tunnel to localhost for demoing your Elixir/Phoenix web application or testing webhook integrations.

Current section

Files

Jump to
ex_ngrok bin wrap
Raw

bin/wrap

#!/bin/bash
# Executes the provided command, terminating it when it receives an EOF
# See: https://shift.infinite.red/foreign-processes-and-phoenix-555179c24151#.1g44vqtoc
COMMAND=$1
shift
ARGUMENTS=$*
$COMMAND $ARGUMENTS &
last_pid=$!
while read line ; do
:
done < /dev/stdin
kill -KILL $last_pid