* fix WebrtcProvider use localhost for dev

This commit is contained in:
2026-05-04 22:56:51 +02:00
parent 32e39384d5
commit 2abc0f8930
2 changed files with 4 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"dev": "PORT=4444 npx y-webrtc & vite",
"build": "tsc --noEmit && vite build",
"preview": "vite preview"
},

View File

@@ -28,7 +28,9 @@ export function initSync(roomId: string): AppSync {
? "connecting"
: "offline";
const provider = new WebrtcProvider(roomId, doc);
const provider = new WebrtcProvider(roomId, doc,{
signaling: ["ws://localhost:4444", "ws://lynxpi.ddns.net:4444"]
});
const persistence = new IndexeddbPersistence(roomId, doc);
const syncConnectionStatus = (status: ConnectionStatus) => {