Initial files

This commit is contained in:
jimmy committed 2021-07-04 02:23:38 +00:00
1 parent 92f55f4509
commit 8aade76b9e
4 files changed
+50

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
from aiohttp import web
async def handle(request):
name = request.match_info.get('name', "Anonymous")
text = "Hello, " + name
return web.Response(text=text)
app = web.Application()
app.add_routes([web.get('/', handle),
web.get('/{name}', handle)])
if __name__ == '__main__':
print("Starting")
web.run_app(app)