Skip to content

Instantly share code, notes, and snippets.

@amcclosky
Created June 29, 2012 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amcclosky/3019024 to your computer and use it in GitHub Desktop.
Save amcclosky/3019024 to your computer and use it in GitHub Desktop.
bash `server` alias
# Start an HTTP server from a directory, optionally specifying the port
# via - http://dl.dropbox.com/u/39519/talks/io-tooling/index.html#13
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