diff --git a/server/host-waitress b/server/host-waitress index 7598081..ce82430 100755 --- a/server/host-waitress +++ b/server/host-waitress @@ -10,7 +10,7 @@ import argparse import os.path import sys import waitress -from szurubooru.facade import create_app +from szurubooru.facade import app def main(): parser = argparse.ArgumentParser('Starts szurubooru using waitress.') @@ -19,7 +19,6 @@ def main(): parser.add_argument('--host', help='IP to listen on', default='0.0.0.0') args = parser.parse_args() - app = create_app() waitress.serve(app, host=args.host, port=args.port) if __name__ == '__main__': diff --git a/server/szurubooru/facade.py b/server/szurubooru/facade.py index e29aae1..7bec33a 100644 --- a/server/szurubooru/facade.py +++ b/server/szurubooru/facade.py @@ -113,3 +113,6 @@ def create_app(): rest.errors.handle(sqlalchemy.orm.exc.StaleDataError, _on_stale_data_error) return rest.application + + +app = create_app()