from BaseHTTPServer import HTTPServer
from RequestHandler import myHandler

PORT_NUMBER = 8080

def main():
        
        try:
                #webserver create and define handler to manage incoming request
                server = HTTPServer(('', PORT_NUMBER), myHandler)
                print('Started server on port' , PORT_NUMBER)

                
                server.serve_forever()

        except KeyboardInterrupt:
                print('Shutting down the web server')
                server.socket.close()


if __name__ == "__main__":
        main()
