Last active
December 17, 2015 06:09
-
-
Save tarmann/5563455 to your computer and use it in GitHub Desktop.
Shell: simple-http-server
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
# Start an HTTP server from a directory, | |
# optional y specifying the port | |
# Add #!/usr/bin/env python to ~/.zshrc | |
function server() { | |
local port="${1:-8000}" | |
open "http://localhost:${port}/" | |
python -m SimpleHTTPServer "$port" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment