diff --git a/v6d1tokens/run-server.py b/v6d1tokens/run-server.py index 58f850c..47da594 100644 --- a/v6d1tokens/run-server.py +++ b/v6d1tokens/run-server.py @@ -1,7 +1,6 @@ import asyncio -from aiohttp import web -from v6d0auth.config import port, host +from v6d0auth.run_app import run_app from v6d1tokens.app import get_app from v6d1tokens.tdb import TDB @@ -11,17 +10,7 @@ async def main(): tdb = TDB() app = get_app(tdb) async with tdb.db: - runner = web.AppRunner(app) - await runner.setup() - site = web.TCPSite(runner, host=host, port=port) - await site.start() - names = sorted(str(s.name) for s in runner.sites) - print( - "======== Running on {} ========\n" - "(Press CTRL+C to quit)".format(", ".join(names)) - ) - while True: - await asyncio.sleep(3600) + await run_app(app) if __name__ == '__main__':