Skip to content

Instantly share code, notes, and snippets.

View Twigonometry's full-sized avatar

Mac Goodwin Twigonometry

View GitHub Profile
@Twigonometry
Twigonometry / simple-python-server.py
Last active October 10, 2020 21:53 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Code based on implementation by bradmontgomery (https://gist.github.com/bradmontgomery/2219997)
Usage:
./simple-python-server.py -h
./simple-python-server.py -l localhost -p 8000
If "no module named http.server", run:
python3 simple-python-server.py -h
python3 simple-python-server.py -l localhost -p 8000