Created
April 5, 2013 09:59
-
-
Save lushone/5318112 to your computer and use it in GitHub Desktop.
Bash function to call a python HTTP server instead of typing out the long winded method. Includes support for passing in port numbers. Port 8000 by default, obviously.
This file contains 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
httpserver() { | |
portNum=$1 | |
if [ -z "$1" ] | |
then | |
python -m SimpleHTTPServer 8000 | |
else | |
python -m SimpleHTTPServer $portNum | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment