This commit is contained in:
Waylon Walker 2023-06-08 09:02:43 -05:00
parent a9ee4a2bd8
commit d68cda91cf
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
22 changed files with 824 additions and 55 deletions

View file

@ -2,8 +2,24 @@ from fastapi import FastAPI
from learn_sql_model.api.hero import hero_router
from learn_sql_model.api.user import user_router
from learn_sql_model.api.websocket import web_socket_router
# from fastapi_socketio import SocketManager
app = FastAPI()
# socket_manager = SocketManager(app=app)
app.include_router(hero_router)
app.include_router(user_router)
app.include_router(web_socket_router)
# @app.sio.on("join")
# def handle_join(sid, *args, **kwargs):
# app.sio.emit("lobby", "User joined")
# @app.sio.on("leave")
# def handle_leave(sid, *args, **kwargs):
# sm.emit("lobby", "User left")