Skip to content

Instantly share code, notes, and snippets.

@quipu
Created March 8, 2014 20:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quipu/9438037 to your computer and use it in GitHub Desktop.
Save quipu/9438037 to your computer and use it in GitHub Desktop.
Simple shell wrapper for pythons SimpleHTTP module
#!/usr/bin/env bash
if [ $1 ] ; then
echo "-- Starting web server on port $1 --"
python -m SimpleHTTPServer $1
else
echo "-- Starting web server on port 8000 --"
python -m SimpleHTTPServer
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment