Skip to content

Commit dbbea7e

Browse files
committed
fixed incorrect import 🤦
1 parent d9feb69 commit dbbea7e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/wss.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Server from "ws"
1+
import { WebSocketServer } from "ws"
22
import { v4 as uuidv4 } from "uuid"
33

44
const waiters = new Map()
@@ -7,7 +7,7 @@ const clients = {}
77
let wss = null
88

99
export function Attach(server, app, router) {
10-
wss = new Server({ server })
10+
wss = new WebSocketServer({ server })
1111

1212
wss.on("connection", (socket, req) => {
1313
const url = new URL(req.url, "http://localhost")

0 commit comments

Comments
 (0)