asynciodemo/httpserver.py

8 lines
175 B
Python
Raw Normal View History

2020-12-01 03:33:15 +00:00
from aiohttp import web
async def hello(request):
return web.Response(text="Hello, world")
app = web.Application()
app.add_routes([web.get('/', hello)])
web.run_app(app)