'Configure the server to listen on localhost.
Default is to choose an arbitrary open port.'

def __init__(self, port_num=0):

    address = ('0.0.0.0', port_num)
    HTTPServer.__init__(self, address, self.HANDLER_CLASS)
    self.config = dict()
    server_thread = threading.Thread(target=self.serve_forever)
    server_thread.daemon = True
    server_thread.start()
    LOGGER.debug('Starting    service    on    port    {0}'.format(self.port))
