diff --git a/atcheck-websocket/server.js b/atcheck-websocket/server.js index 4bace68..67a7617 100644 --- a/atcheck-websocket/server.js +++ b/atcheck-websocket/server.js @@ -1,10 +1,14 @@ const WebSocket = require('ws'); var https = require('https'); -const fs = require('fs'); + +var websocket_port = 8888; +const wss = new WebSocket.Server({port: websocket_port}); +console.log("Websocket server running on port " + websocket_port); var lookup = []; wss.on('connection', function connection(ws) { + console.log(ws); lookup[ws.protocol] = ws; }); @@ -40,8 +44,7 @@ var server = https.createServer({ response.end("Undefined request ."); } }); -var websocket_port = 8888; -const wss = new WebSocket.Server({port: websocket_port}); -server.listen(websocket_port); -console.log("HTTP server running on port " + websocket_port); +var https_port = 8889; +server.listen(https_port); +console.log("HTTP server running on port " + https_port);