diff --git a/server.py b/server.py index ac2e2ea..b334dc4 100644 --- a/server.py +++ b/server.py @@ -1,5 +1,6 @@ import asyncio import aiohttp +from aiohttp import web import logging import os import io @@ -86,7 +87,7 @@ async def monitor_garage_door(app): # --- Web Server --- async def handle_root(request): """Handler for the root GET request.""" - return aiohttp.web.Response(text="hello world") + return web.Response(text="hello world") async def on_startup(app): """Actions to perform on application startup.""" @@ -120,11 +121,11 @@ async def on_cleanup(app): logging.info("Cleanup complete.") def main(): - app = aiohttp.web.Application() + app = web.Application() app.router.add_get('/', handle_root) app.on_startup.append(on_startup) app.on_cleanup.append(on_cleanup) - aiohttp.web.run_app(app) + web.run_app(app) if __name__ == '__main__': if not os.path.exists(MODEL_PATH):