Last active
December 12, 2015 06:48
-
-
Save Sigmus/4732030 to your computer and use it in GitHub Desktop.
Open browser and serve current dir.
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
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