wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.63k stars 1.18k forks source link

Enable using the Websocket server inside of server-side code outside of the Websocket init function #1289

Open infomiho opened 1 year ago

infomiho commented 1 year ago

Right now, the initialized server is not exposed or documented for the user to use.

For example, when somebody likes a post, it might trigger something and a notification is sent over the socket.

Martinsos commented 8 months ago

Relevant Discord convo, we had user asking for this: https://discord.com/channels/686873244791210014/1208036265308586034/1208060190856056932 .

GavPierce commented 7 months ago

@Martinsos Any update on this? What would be the best way to have the server send web socket events to update the client, on download status for example, outside of the webSocket fn? (Also the Discord link has expired and can't join discord :(( )

Martinsos commented 7 months ago

@Martinsos Any update on this? What would be the best way to have the server send web socket events to update the client, on download status for example, outside of the webSocket fn? (Also the Discord link has expired and can't join discord :(( )

@infomiho knows the best about websockets in Wasp so will be able to provide some clarity!

This is our perma-invite, it works for me and should work well: https://discord.gg/rzdnErX !

GavPierce commented 7 months ago

Small update here, for visibility:

The current work around is to:

I believe they are working on making it more built in to the Wasp Experience :)

infomiho commented 2 weeks ago

Another use asking for this: https://ptb.discord.com/channels/686873244791210014/1284171829493108799/1291351815337807942