(loop)
| 32 | |
| 33 | @asyncio.coroutine |
| 34 | def main(loop): |
| 35 | app = web.Application(loop=loop) |
| 36 | app.router.add_route('GET', '/', wshandler) |
| 37 | |
| 38 | handler = app.make_handler() |
| 39 | srv = yield from loop.create_server(handler, '127.0.0.1', 9001) |
| 40 | print("Server started at http://127.0.0.1:9001") |
| 41 | return app, srv, handler |
| 42 | |
| 43 | |
| 44 | @asyncio.coroutine |
no test coverage detected