implement generic broadcastchannel and apply it to websocket provider

This commit is contained in:
Kevin Jahns
2018-11-27 18:29:18 +01:00
parent ab3dba5b06
commit a2c51c36e9
6 changed files with 166 additions and 18 deletions

View File

@@ -0,0 +1,9 @@
/* eslint-env browser */
const isDeployed = location.hostname === 'yjs.website'
if (!isDeployed) {
console.log('%cYjs: Start your local websocket server by running %c`npm run websocket-server`', 'color:blue', 'color: grey; font-weight: bold')
}
export const serverAddress = isDeployed ? 'wss://api.yjs.website' : 'ws://localhost:1234'