Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion valet
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,17 @@ then
fi
done

# Determine which region to pass along to ngrok...

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just be REGION=${2:-"us"}, which will take the second argument as the region, using us as the default value.

if [[ -z "$2" ]]
then
REGION="us"
else
REGION="$2"
fi

# Fetch Ngrok URL In Background...
bash "$DIR/cli/scripts/fetch-share-url.sh" &
sudo -u $(logname) "$DIR/bin/ngrok" http -host-header=rewrite "$HOST.$DOMAIN:80"
sudo -u $(logname) "$DIR/bin/ngrok" http -host-header=rewrite -region="$REGION" "$HOST.$DOMAIN:80"
exit

# Finally, for every other command we will just proxy into the PHP tool
Expand Down