Skip to content

Instantly share code, notes, and snippets.

Created February 5, 2017 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/aab41ff8de8698f45261bdec1e545677 to your computer and use it in GitHub Desktop.
Save anonymous/aab41ff8de8698f45261bdec1e545677 to your computer and use it in GitHub Desktop.
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class Handler(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header("Content-type", "text/html")
self.end_headers()
self.wfile.write("OP HUI!")
class Server(object):
def __init__(self):
self.httpd = HTTPServer(("", 12345), Handler)
def Run(self):
self.httpd.serve_forever()
Server().Run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment