From 234e94ade2c0791cd533ff03cf8874cedc438f72 Mon Sep 17 00:00:00 2001 From: electroluxcode <3451613934@qq.com> Date: Tue, 27 Aug 2024 11:17:34 +0800 Subject: [PATCH] fix(docs): error ws usage --- docs/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 4e48c3b4c..0e91fc3b0 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -44,7 +44,7 @@ var WebSocketJSONStream = require('@teamwork/websocket-json-stream') var app = express() var server = http.createServer(app) -var webSocketServer = WebSocket.Server({server: server}) +var webSocketServer = new WebSocket.Server({server: server}) var backend = new ShareDB() webSocketServer.on('connection', (webSocket) => {