import asyncio from aiohttp import web loop = asyncio.get_event_loop() async def handle(request): return web.Response(body=b'') async def init(): app = web.Application() app.router.add_route('GET', '/', handle) return await loop.create_server(app.make_handler(), '127.0.0.1', 8080) loop.run_until_complete(init()) loop.run_forever()