Skip to content
This repository was archived by the owner on Apr 4, 2024. It is now read-only.
This repository was archived by the owner on Apr 4, 2024. It is now read-only.

How do i use it? #46

Open
Open
@lrosch

Description

@lrosch

I'm currently trying to work this module into my Server. I tried to test it via

`if name == "main":
app = FastAPI()
socket_manager = SocketManager(app=app)
uvicorn.run(app, host="localhost", port=40000)

@app.sio.on('join')
async def handle_join(sid, *args, **kwargs):
    await app.sio.emit('lobby', 'User joined')


@app.sio.event
async def connect(sid, environ):
    print(f"client {sid} has connected to the server")

`

i want to run my socketio on my /socket.io route is it possible via this module, since mounting the normal socket.io to fastapi results in a 404 route not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions