blob: 7b587d862ead7bc986bb3288f124edf799e48db2 [file] [log] [blame]
Andrea Campanellaedfdbca2017-02-01 17:33:47 -08001#!/usr/bin/python
2
3import BaseHTTPServer
4
5
6class HTTPHandlerOne(BaseHTTPServer.BaseHTTPRequestHandler):
7 def do_GET(self):
8 with open('./message.html', 'r') as msgfile:
9 message = msgfile.read()
10 self.wfile.write(message)
11
12
13def run(server_class=BaseHTTPServer.HTTPServer,
14 handler_class=BaseHTTPServer.BaseHTTPRequestHandler):
15 server_address = ('192.168.0.1', 8000)
16 httpd = server_class(server_address, handler_class)
17 httpd.serve_forever()
18
19run(handler_class=HTTPHandlerOne)