Last active
May 17, 2020 22:26
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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