Tiny demo focused on one thing: open a realtime collaboration session from Node.js and mutate it via HTTP.
This example uses @superdoc-dev/sdk from npm and exposes the same endpoints as the FastAPI sample:
GET /GET /statusGET /insert?text=...GET /markdownGET /download
package.json tracks the npm latest channel for @superdoc-dev/sdk.
server.mjs is hardcoded for the local @y/hub server in ../fastapi/yjs-hub.
It reuses the FastAPI sample assets:
../fastapi/assets/doc-template.docx../fastapi/assets/fake-nda.md
and writes /download output to examples/editor/collaboration/backends/node-sdk/.superdoc-state/download.docx.
cd /path/to/superdoc/examples/editor/collaboration/backends/node-sdk
npm installFrom the FastAPI sample folder:
cd /path/to/superdoc/examples/editor/collaboration/backends/fastapi
./run-yjs-hub.shIf you use a custom token, set it before starting the Node server:
export YHUB_AUTH_TOKEN="my-demo-token"cd /path/to/superdoc/examples/editor/collaboration/backends/node-sdk
npm run devDefault URL: http://127.0.0.1:8001
curl "http://127.0.0.1:8001/status"
curl "http://127.0.0.1:8001/insert?text=hello%20from%20node%20sdk"