From dae6c0c71a13a6d1c1bdb3098451e94c99e1e922 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 18 Apr 2023 18:04:25 -0700 Subject: [PATCH] chore: add local<->public test script --- test/test-local.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 test/test-local.sh diff --git a/test/test-local.sh b/test/test-local.sh new file mode 100755 index 000000000..95c24b8fc --- /dev/null +++ b/test/test-local.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# This script will make your local Owncast server available at a public URL. +# It's particularly useful for testing on mobile devices. + +PORT=8080 +USERNAME=$(whoami) +BRANCH=$(git symbolic-ref --short -q HEAD | sed 's/[^a-z A-Z 0-9]//g') +HOSTNAME="oc-$USERNAME-$BRANCH" + +echo "Please wait. Making the local server port $PORT available at https://$HOSTNAME.serveo.net" +ssh -R "$HOSTNAME".serveo.net:80:localhost:$PORT serveo.net