Skip to content
Discussion options

You must be logged in to vote

Does it make sense for a server to have subscription/streaming?

It depends on your use case and the desired workflow. Based on your description it seems that the Next.js server is acting as a proxy/middleware layer for the PocketBase API, and in this case it should be OK to use it this way.


Are server-side subscriptions currently achievable (with either the SDK or the PB framework)?

Yes, in both cases.

If you want to use the SDK and the realtime service in node, you can load an EventSource polyfill:

// npm install eventsource --save
import eventsource from 'eventsource';

global.EventSource = eventsource;

...

(this and other node caveats could be found in https://github.com/pocketba…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TahLoow
Comment options

Answer selected by TahLoow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants