'A web app served by a WSGI-server that starts with App.run().
By default, the app is served from the folder of the script that imports pattern.server.
By default, static content is served from the given subfolder.
@App.route(path) defines a URL path handler.
@App.error(code) defines a HTTP error handler.'

def __init__(self, name=None, path=SCRIPT, static='./static', rate='rate.db', owner=None):

    rate = os.path.join(path, rate)
    self._owner = owner
    self._name = name
    self._path = path
    self._host = None
    self._port = None
    self._app = None
    self._up = False
    self._cache = {}
    self._cached = 1000
    self._static = static
    self._rate = rate
    self.router = Router()
    self.thread = App.Thread()
    os.chdir(path)
    chown(path, owner)
