Created
December 7, 2018 21:11
-
-
Save ordinz/c9e3273c2a9a6a15f8cb01cdcb4cba60 to your computer and use it in GitHub Desktop.
Open up a HTTP connection from the current directory
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
expose_http(){ | |
PORT=8000 | |
URL=http://`hostname`:$PORT | |
echo | |
echo Caution: Opening hole to the void. | |
echo | |
echo Exposing `pwd` to $URL | |
echo | |
{ | |
sleep 1 | |
`open $URL` | |
}& | |
ruby -run -ehttpd . -p $PORT | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment