Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Local python server that only allows connections from localhost
http() {
python -c "import BaseHTTPServer as bhs, SimpleHTTPServer as shs; bhs.HTTPServer(('', $1), shs.SimpleHTTPRequestHandler).serve_forever()" &
(Called like: "http 8000")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment