From 8f44593d55c82197854d9e29174fe66c4e50ebde Mon Sep 17 00:00:00 2001 From: Alexis Hovorka Date: Sat, 17 Feb 2024 00:42:20 -0700 Subject: [refactor] Switch to ES Modules --- app/lib/socket.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/lib/socket.js') diff --git a/app/lib/socket.js b/app/lib/socket.js index 88fdd49..9222d00 100644 --- a/app/lib/socket.js +++ b/app/lib/socket.js @@ -1,6 +1,4 @@ -"use strict"; - -const WebSocket = require("ws"); +import WebSocket from "ws"; class Client { constructor(ws) { @@ -27,7 +25,7 @@ class Client { } } -module.exports = class Socket { +export default class Socket { constructor(server) { this.wss = new WebSocket.Server({server}); this.handlers = {}; -- cgit v1.2.3-70-g09d2