Server side Query observer
Hi is it possible to create a server side application that is also reactive to simulate a Pub/Sub type setup?
I understand that the React API under the hood must be doing this (connecting my node to your socket or something and get notified) but I could not figure out on the docs.
Or is the right way to poll the api/query endpoint? or perhaps the watch endpoint (which I'd love to see an example of).
Thanks
P.
3 Replies
Yep! See the "subscription client" example at https://docs.convex.dev/client/javascript/node
more detailed docs at https://docs.convex.dev/client/javascript#convex-client
and in convex-demos, see "node" https://github.com/get-convex/convex-demos/blob/main/node/script-in-typescript.ts
GitHub
convex-demos/node/script-in-typescript.ts at main ยท get-convex/conv...
Demo apps built on Convex. Contribute to get-convex/convex-demos development by creating an account on GitHub.
๐๐คฉ๐๐๐๐๐คฉ