Skip to content

Instantly share code, notes, and snippets.

@Sigmus
Last active December 12, 2015 06:48
Show Gist options
  • Save Sigmus/4732030 to your computer and use it in GitHub Desktop.
Save Sigmus/4732030 to your computer and use it in GitHub Desktop.
Open browser and serve current dir.
function server() {
if [ $1 ]
then
open "http://localhost:$1"
python -m SimpleHTTPServer $1
else
open "http://localhost:8000"
python -m SimpleHTTPServer 8000
fi
}
// Add this to your bash profile.
// Type "server ." to open browser and serve current dir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment