Skip to content

Instantly share code, notes, and snippets.

@steffiland
Created February 7, 2018 10:43
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 steffiland/2e73daa9b9c3407e55e5c417997bd2aa to your computer and use it in GitHub Desktop.
Save steffiland/2e73daa9b9c3407e55e5c417997bd2aa to your computer and use it in GitHub Desktop.
quick and simple HTTP servers

Works on windows as well.

Python2:

python -m SimpleHTTPServer [8000]     # starts a simple http server in current directory
python -m CGIHTTPServer [8000]          # allow cgi-bin subdirectory

Python3:

python -m http.server 8000 [--cgi] --bind 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment