Skip to content

Instantly share code, notes, and snippets.

@elibroftw
Last active May 17, 2020 22:26
Show Gist options
  • Save elibroftw/bcbf2ee1c8662d8fb6f6116a3705d337 to your computer and use it in GitHub Desktop.
Save elibroftw/bcbf2ee1c8662d8fb6f6116a3705d337 to your computer and use it in GitHub Desktop.
A simple HTTP server for python 3.x which serves files in your drive
from http.server import HTTPServer, SimpleHTTPRequestHandler
import os
server_address = ('0.0.0.0', 8081)
httpd = HTTPServer(server_address, SimpleHTTPRequestHandler)
os.chdir('C:/') # optional
print('Running server...')
httpd.serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment