T
tRPC

call socket.io events from inside trpc endpoints?

call socket.io events from inside trpc endpoints?

Ttest_16/23/2023
how do i implement notifications when someone likes a post with socket.io? will every user have his own socket.io room and then when someone likes their post that someone joins their room to send websocket? and what if user is offline i dont want any websocket event also how do i have my server broadcast a websocket inside the trpc route itself instead of having the frontend send both a fetch and emitting a socket event? since socket.io is inside a function io.on and its seperate from my trpc endpoints idk how to emit stuff from the endpoints
AAlbastru7/4/2023
do you have any examples of how your socket.io is currently setup?

Looking for more? Join the community!

T
tRPC

call socket.io events from inside trpc endpoints?

Join Server