Upgrade y-websocket sidecar from v1 to @y/websocket-server (v2)
Replace the inline y-websocket@1 server hack with the official @y/websocket-server package for proper v2 protocol support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ca5c30c844
commit
a7209f304b
|
|
@ -56,18 +56,8 @@ services:
|
|||
- sh
|
||||
- -c
|
||||
- |
|
||||
npm init -y > /dev/null 2>&1
|
||||
npm install y-websocket@1 ws > /dev/null 2>&1
|
||||
node -e "
|
||||
const ws = require('ws');
|
||||
const Y = require('yjs');
|
||||
const {setupWSConnection, docs} = require('y-websocket/bin/utils');
|
||||
const host = process.env.HOST || '0.0.0.0';
|
||||
const port = parseInt(process.env.PORT || '1234');
|
||||
const wss = new ws.Server({ host, port });
|
||||
wss.on('connection', setupWSConnection);
|
||||
console.log('y-websocket server running on ' + host + ':' + port);
|
||||
"
|
||||
npm install @y/websocket-server > /dev/null 2>&1
|
||||
npx y-websocket
|
||||
environment:
|
||||
- HOST=0.0.0.0
|
||||
- PORT=1234
|
||||
|
|
|
|||
Loading…
Reference in New Issue