Last active
June 9, 2025 15:40
-
-
Save jesherdevsk8/1c9bef15240c253a792b9c73ff5ada1d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| ## token link https://dashboard.ngrok.com/get-started/your-authtoken | |
| ## ngrok config add-authtoken xxxxxxxxxxxxxxxxxxxxxxxxxxx | |
| pServer() { | |
| python3 -m http.server 8010 & | |
| pid=$! | |
| echo "PID: $pid" | |
| } | |
| nGrok() { | |
| if command -v ngrok &> /dev/null; then | |
| pServer | |
| sleep 3 | |
| ngrok http 8010 | |
| else | |
| echo "error: ngrok não instalado" | |
| fi | |
| } | |
| main() { | |
| nGrok | |
| kill -9 "$pid" | |
| } | |
| main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment