Skip to content

Instantly share code, notes, and snippets.

@ordinz
Created December 7, 2018 21:11
Open up a HTTP connection from the current directory
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