'Run the server.
Parameters
port : int, optional
The port to bind to.
retry : bool, optional
If the port is busy, should we retry with the next available port?
**kwargs
Forwarded to the underlying flask app\'s ``run`` method.
Notes
This function blocks forever when successful.'

def run(self, port=DEFAULT_PORT, retry=False, **kwargs):

    self.port = port
    try:
        self.app.logger.debug('Starting    server...')
        self.app.run(port=port, **kwargs)
        self.app.logger.debug('Stopping    server...')
    except socket.error:
        if (not retry):
            raise
        warn(("Oops,    couldn't    connect    on    port    %d.        Is    it    busy?" % port))
        self.run(port=(port + 1), retry=retry, **kwargs)
