added beer-api

Change-Id: Ie2460397399b24d0e367cf6e4b8b8d7dc01eab83
This commit is contained in:
Andrew Karpow 2018-11-12 11:06:35 +00:00
parent b46ab9e658
commit 0cc990dead
1 changed files with 17 additions and 0 deletions

17
beer-api.py Normal file
View File

@ -0,0 +1,17 @@
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import SocketServer
class S(BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type', 'text/html')
self.end_headers()
self.wfile.write("<html><body><h1>BEER!</h1></body></html>")
PORT = 8000
httpd = SocketServer.TCPServer(("", PORT), S)
print "serving at port", PORT
httpd.serve_forever()