We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9feb69 commit dbbea7eCopy full SHA for dbbea7e
1 file changed
src/wss.js
@@ -1,4 +1,4 @@
1
-import Server from "ws"
+import { WebSocketServer } from "ws"
2
import { v4 as uuidv4 } from "uuid"
3
4
const waiters = new Map()
@@ -7,7 +7,7 @@ const clients = {}
7
let wss = null
8
9
export function Attach(server, app, router) {
10
- wss = new Server({ server })
+ wss = new WebSocketServer({ server })
11
12
wss.on("connection", (socket, req) => {
13
const url = new URL(req.url, "http://localhost")
0 commit comments