10 Replies
Hello,
Yes we do. Let me share some examples
Is it somewhere in docs ?
No, I've made an application take hooks into the Discord API (websocket).
utilities/clients/discord/helpers/registerEvents.js
How would the cost work for websockets ? Also does it support SSE ?
do you mean outgoing websockets or incoming websockets Tanmay?
like connecting to someone else's websocket, or listening to websockets from the browser connecting to your app?
gadget supports outgoing websockets just fine, but it can definitely get expensive if you need to be listening all the time. we can work out custom pricing if its going to be really big. and then gadget also supports incoming websockets just fine, as well as SSE. we use websockets for vite HMR and SSE for AI apps often
you can also avoid the need to create your own websockets or SSE systems with live queries which are all wired up and ready to go and don't have any of the same billing concerns
Just for more context this is what I am trying to do
https://discord.com/channels/836317518595096598/1336906030784843786
Thanks for the example @Chocci_Milk What endpoint would I be able to access this websocket on ? ws:://app-url/ ?
Is SSE stuff documented anywhere ? I tried to set that up in routes but didnt work so kinda confused where to put that code and what endpoint to access it from
The way that I set it up was by making a route just for the Discord webscoket. Here's the code that I had:
Thanks for this what would be the ws endpoint if I am connecting to it from the frontend ?
We've discussed this on a call and what was decided was a rework of the feature to use bulkOperations and make logs about product update batches rather than each individual product