megad/utils.py
async def make_server(handle: typing.Callable[[web.Request], typing.Awaitable[web.Response]], port: int) -> typing.Tuple[web.Server, web.TCPSite]:
    """
    Make server and start it immidiatly
    :param handle: handler coroutinefunction
    :param port: port on wich server will be started
    :return:
    """
    assert asyncio.iscoroutinefunction(handle), 'handle must coroutine function'
    server = web.Server(handle)
    runner = web.ServerRunner(server)
    await runner.setup()
    site = web.TCPSite(runner, 'localhost', port)
    await site.start()
    return server, site

    Make server and start it immidiatly
    :param handle: handler coroutinefunction
    :param port: port on wich server will be started
    :return:
    
Make server and start it immidiatly
Make server and start it immidiatly
async def make_server(handle: typing.Callable[[web.Request], typing.Awaitable[web.Response]], port: int) -> typing.Tuple[web.Server, web.TCPSite]:
    assert asyncio.iscoroutinefunction(handle), 'handle must coroutine function'
    server = web.Server(handle)
    runner = web.ServerRunner(server)
    await runner.setup()
    site = web.TCPSite(runner, 'localhost', port)
    await site.start()
    return server, site
async def make_server ( handle : typing . Callable [ [ web . Request ] , typing . Awaitable [ web . Response ] ] , port : int ) -> typing . Tuple [ web . Server , web . TCPSite ] : assert asyncio . iscoroutinefunction ( handle ) , 'handle must coroutine function' server = web . Server ( handle ) runner = web . ServerRunner ( server ) await runner . setup ( ) site = web . TCPSite ( runner , 'localhost' , port ) await site . start ( ) return server , site
Make server and start it immidiatly
Make server and start it immidiatly
"""
    Make server and start it immidiatly
    :param handle: handler coroutinefunction
    :param port: port on wich server will be started
    :return:
    """
None
handle
typing.Callable[[web.Request], typing.Awaitable[web.Response]]
None
port
int
port on wich server will be started
port on wich server will be started