ballingt
ballingt3y ago

1 to Indy above if you have your own

+1 to Indy above, if you have your own node server you can also subscribe to queries just like in the browser (for realtime updates) but often the cloud polling strategy is easier to set up.
3 Replies
mrt308251
mrt3082513y ago
If it works on my own node server the same way it is setup to work on the browser than -to me- it's a much better solution then polling!
ballingt
ballingtOP3y ago
There's no node.js code sample posted yet, but the gist is
new ConvexReactClient(
{ address: "funny-animal-1.convex.cloud" },
{
webSocketConstructor: nodeWebSocket,
unsavedChangesWarning: false,
}
);
new ConvexReactClient(
{ address: "funny-animal-1.convex.cloud" },
{
webSocketConstructor: nodeWebSocket,
unsavedChangesWarning: false,
}
);
using the 'ws' package for a websocket client in node
mrt308251
mrt3082513y ago
👍 Great! Bookmarked for -hopefully- future use/test

Did you find this page helpful?