18 lines
348 B
Python
18 lines
348 B
Python
from http.server import HTTPServer
|
|
from webserver import WebServer
|
|
|
|
# Server config
|
|
SERVER_HOST = "localhost"
|
|
SERVER_PORT = 4000
|
|
|
|
|
|
class PrintServer(object):
|
|
def __init__(self):
|
|
self.server = HTTPServer((SERVER_HOST, SERVER_PORT), WebServer)
|
|
|
|
def start(self):
|
|
# Start serving pages
|
|
self.server.serve_forever()
|
|
self.server.server_close()
|
|
|