Skip to content

Commit

Permalink
This may work.
Browse files Browse the repository at this point in the history
  • Loading branch information
JDJGInc committed Mar 2, 2024
1 parent 806610d commit 8cca99a
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import discord
from aiohttp import web
import asyncio

routes = web.RouteTableDef()

Expand Down Expand Up @@ -64,5 +65,13 @@ def run():


def runner():
server = Thread(target=run)
server.start()
asyncio.run(run_app())

async def run_app():
app = web.Application()
app.add_routes(routes)
runner = web.AppRunner(app)
await runner.setup()
site = web.TCPSite(runner, 'localhost', 2343)
await site.start()
await asyncio.Event().wait()

0 comments on commit 8cca99a

Please sign in to comment.