Skip to content

Commit

Permalink
Move obsolete examples to legacy folder
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed Jul 28, 2016
1 parent 688b836 commit e10fc28
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 15 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions examples/web_classview1.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ async def init(loop):
app.router.add_post('/post', MyView)
return app

handler = app.make_handler()
srv = await loop.create_server(handler, '127.0.0.1', 8080)
print("Server started at http://127.0.0.1:8080")
return srv, handler


loop = asyncio.get_event_loop()
app = loop.run_until_complete(init(loop))
Expand Down
13 changes: 3 additions & 10 deletions examples/web_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,8 @@ def init(loop):
app.router.add_get('/', root)
app.router.add_get('/login', login)
app.router.add_get('/logout', logout)

handler = app.make_handler()
srv = yield from loop.create_server(handler, '127.0.0.1', 8080)
print("Server started at http://127.0.0.1:8080")
return srv, handler
return app

loop = asyncio.get_event_loop()
srv, handler = loop.run_until_complete(init(loop))
try:
loop.run_forever()
except KeyboardInterrupt:
loop.run_until_complete(handler.finish_connections())
app = loop.run_until_complete(init(loop))
web.run_app(app, loop=loop)

0 comments on commit e10fc28

Please sign in to comment.