test-local.sh 439 B

123456789101112
  1. #!/bin/bash
  2. # This script will make your local Owncast server available at a public URL.
  3. # It's particularly useful for testing on mobile devices.
  4. PORT=8080
  5. USERNAME=$(whoami)
  6. BRANCH=$(git symbolic-ref --short -q HEAD | sed 's/[^a-z A-Z 0-9]//g')
  7. HOSTNAME="oc-$USERNAME-$BRANCH"
  8. echo "Please wait. Making the local server port $PORT available at https://$HOSTNAME.serveo.net"
  9. ssh -R "$HOSTNAME".serveo.net:80:localhost:$PORT serveo.net