Skip to content

Instantly share code, notes, and snippets.

@lborgav
Last active August 29, 2015 14:12
Show Gist options
  • Select an option

  • Save lborgav/e489fb26deaea47e6b51 to your computer and use it in GitHub Desktop.

Select an option

Save lborgav/e489fb26deaea47e6b51 to your computer and use it in GitHub Desktop.
# Simple HTTP server from a directory, optionally specifying a port
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