Skip to content

Instantly share code, notes, and snippets.

@uilian
Created January 23, 2018 15:38
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 uilian/2038135196b0761ab54946776829d4fb to your computer and use it in GitHub Desktop.
Save uilian/2038135196b0761ab54946776829d4fb to your computer and use it in GitHub Desktop.
Python as a HTTP server
# Python has a HTTP server built into the
# standard library. This is super handy for
# previewing websites.
# Python 3.x
$ python3 -m http.server
# Python 2.x
$ python -m SimpleHTTPServer 8000
# (This will serve the current directory at
# http://localhost:8000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment