from http.server import SimpleHTTPRequestHandler, HTTPServer class RequestHandler(SimpleHTTPRequestHandler): def __init__(self, *args, **kwargs): super().__init__(*args, directory='./', **kwargs) def run(server_class=HTTPServer, handler_class=RequestHandler, port=8000): server_address = ('', port) httpd = server_class(server_address, handler_class) print(f'Starting httpd on port {port}...') httpd.serve_forever() if __name__ == '__main__': run()