I want to make a discord bot dashboard with replit and I want to use quart, there is my keep_alive function:
def run():
app.run(host="0.0.0.0", port=8080)
def keep_alive():
server = Thread(target=run)
server.start()
There is just one little problem, I don't know what to use instead of thread because Quart is an asynchronous library.
With hypercorn.asyncio.serve
, you can turn an ASGI server (i.e., Quart here) to an asnycio.Future
object, which allows you to push the Future
to event loop (by asyncio.create_task
or something else) and run it at background.