summaryrefslogtreecommitdiff
path: root/app/lib/socket.js
diff options
context:
space:
mode:
authorAlexis Hovorka <[email protected]>2024-02-17 00:42:20 -0700
committerAlexis Hovorka <[email protected]>2024-02-17 00:42:20 -0700
commit8f44593d55c82197854d9e29174fe66c4e50ebde (patch)
treea43a6d763517d1304076897952b1111886303158 /app/lib/socket.js
parentc5aa364e0e372d0e29063a27bd17811446db8b6a (diff)
[refactor] Switch to ES Modules
Diffstat (limited to 'app/lib/socket.js')
-rw-r--r--app/lib/socket.js6
1 files changed, 2 insertions, 4 deletions
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 = {};