MCPcopy
hub / github.com/aio-libs/aiohttp / init

Function init

examples/web_classview1.py:50–59  ·  view source on GitHub ↗
(loop)

Source from the content-addressed store, hash-verified

48
49
50async def init(loop):
51 app = Application(loop=loop)
52 app.router.add_route('GET', '/', index)
53 app.router.add_route('GET', '/get', MyView)
54 app.router.add_route('POST', '/post', MyView)
55
56 handler = app.make_handler()
57 srv = await loop.create_server(handler, '127.0.0.1', 8080)
58 print("Server started at http://127.0.0.1:8080")
59 return srv, handler
60
61
62loop = asyncio.get_event_loop()

Callers 1

web_classview1.pyFile · 0.70

Calls 4

make_handlerMethod · 0.95
ApplicationClass · 0.90
add_routeMethod · 0.45
create_serverMethod · 0.45

Tested by

no test coverage detected