tRPCttRPC
Powered by
test_1T
tRPC•3y ago•
1 reply
test_1

call socket.io events from inside trpc endpoints?

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
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Call multiple TRPC endpoints from onSuccess()?
peternovakPpeternovak / ❓-help
3y ago
[HOW TO?] Call trpc endpoints from vanilla nextJs api routes
LaunchThat.AppLLaunchThat.App / ❓-help
3y ago
TRPC ratelimiting endpoints
rustclanRrustclan / ❓-help
3y ago