archive
/
catfish
Archived
1
Fork 0
This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
catfish/catfish/router/__init__.py

19 lines
443 B
Python

import click
from aiohttp import web
async def handle_request(request):
return web.json_response({})
def get_server():
return web.Server(handle_request)
async def run_server(loop, port):
click.echo("Starting server...")
aiohttp_server = get_server()
aio_server = await loop.create_server(aiohttp_server, "0.0.0.0", port)
click.echo("Server listening on port {}".format(port))
await aio_server.serve_forever()