Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
BoryaGames authored Oct 21, 2024
1 parent 96514b8 commit 0388688
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cattopy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def __init__(self, port: str | int | None = None, debug: bool = False):
self.debug = debug
self.config = uvicorn.Config(
self._makehandler(),
host="0.0.0.0",
port=self.port,
log_level="trace" if self.debug else "error",
headers=[("server", "catto.py")],
Expand Down Expand Up @@ -109,7 +110,7 @@ async def _handler(
await send({"type": "http.response.body", "body": "404: Not Found".encode()})

def running(self, func: Callable[[], Any]) -> Callable[[], Any]:
self._onrunning = func
self.onRunning = func
return func

def run(self):
Expand Down

0 comments on commit 0388688

Please sign in to comment.