Skip to content

Instantly share code, notes, and snippets.

@tarmann
Last active December 17, 2015 06:09
Show Gist options
  • Save tarmann/5563455 to your computer and use it in GitHub Desktop.
Save tarmann/5563455 to your computer and use it in GitHub Desktop.
Shell: simple-http-server
# 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