You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are use cases where the server is the master of the documents. Is there a better way to have documents created by the server than opening a socket to self, i.e., running a client on the server?
I think the best way to do this is to create a document in your database with an initial value through a POST request and open that document from the backend.
I've managed to get a Plate.js + Slate-yjs + y-socket.io setup to work using the 'document-update' and the 'document-loaded' event handlers from this library, and the app is 100% server-driven. If you're trying to get a similar setup, I'd be happy to give you some pointers!
There are use cases where the server is the master of the documents. Is there a better way to have documents created by the server than opening a socket to self, i.e., running a client on the server?
y-websocket has
getYDoc()
to create new documents on the server.Couldn't y-socket.io somehow export
initDocument()
as well?The text was updated successfully, but these errors were encountered: