]> Repos - mime-chat/commitdiff
fix websocket declaration
authorriqo <hernandeze2@xavier.edu>
Sat, 30 Jan 2021 21:25:37 +0000 (15:25 -0600)
committerriqo <hernandeze2@xavier.edu>
Sat, 30 Jan 2021 21:25:37 +0000 (15:25 -0600)
src/background.ts

index 169469aa3ba28fe4c1bd6452e50aa8ce3d4bbe21..56d341918d5db16ce2ddaa1ee37aac484514d573 100644 (file)
@@ -23,7 +23,6 @@ let ai = new portAudio.AudioIO({
 });
 
 import WebSocket from "ws";
-const ws = new WebSocket("ws://localhost:8080");
 
 // Keep a global reference of the window object, if you don't, the window will
 // be closed automatically when the JavaScript object is garbage collected.
@@ -62,6 +61,7 @@ function createWindow() {
 
   win.webContents.on('did-finish-load', () => {
 
+    const ws = new WebSocket("ws://localhost:8080");
     ws.on("open", function open() {
       // ws.send("hernandeze2@xavier.edu");
     });