We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 554af29 commit b064105Copy full SHA for b064105
www/app.py
@@ -17,11 +17,10 @@
17
def index(request):
18
return web.Response(body=b'<h1>Awesome</h1>')
19
20
-@asyncio.coroutine
21
-def init(loop):
+async def init(loop):
22
app = web.Application(loop=loop)
23
app.router.add_route('GET', '/', index)
24
- srv = yield from loop.create_server(app.make_handler(), '127.0.0.1', 9000)
+ srv = await loop.create_server(app.make_handler(), '127.0.0.1', 9000)
25
logging.info('server started at http://127.0.0.1:9000...')
26
return srv
27
0 commit comments