From fcc52ff25c3003a857250615b204a532fc935d94 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Fri, 6 Dec 2019 20:19:32 +0100 Subject: [PATCH] update room-name in readme --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5dbe709..f8e970c 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ import * as Y from 'yjs' import { WebrtcProvider } from '../src/y-webrtc.js' const ydoc = new Y.Doc() -const provider = new WebrtcProvider('prosemirror', ydoc) -const yarray = ydoc.get('prosemirror', Y.XmlFragment) +// clients connected to the same room-name share document updates +const provider = new WebrtcProvider('your-room-name', ydoc) +const yarray = ydoc.get('array', Y.Array) ``` ##### Signalling @@ -38,7 +39,7 @@ PORT=4444 node ./bin/server.js Peers using the same signalling server will find each other. You can specify several custom signalling servers like so: ```js -const provider = new WebrtcProvider('prosemirror', ydoc, { signalling: ['wss://y-webrtc-ckynwnzncc.now.sh', 'ws://localhost:4444'] }) +const provider = new WebrtcProvider('your-room-name', ydoc, { signalling: ['wss://y-webrtc-ckynwnzncc.now.sh', 'ws://localhost:4444'] }) ``` ### Logging