Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async def httpstan_server():
"""Manage starting and stopping the httpstan HTTP server."""
host, port = "127.0.0.1", unused_tcp_port()
app = httpstan.app.make_app()
runner = aiohttp.web.AppRunner(app)
await runner.setup()
site = aiohttp.web.TCPSite(runner, host, port)
await site.start()
yield (host, port)
await runner.cleanup()