From e200410e51a5d597e7f116f0abb3487fe5676d76 Mon Sep 17 00:00:00 2001 From: "barwie2@st.amu.edu.pl" Date: Sun, 8 Mar 2020 22:19:43 +0100 Subject: [PATCH] post htrps fix --- atcheck-websocket/server.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/atcheck-websocket/server.js b/atcheck-websocket/server.js index 8c212d5..4bace68 100644 --- a/atcheck-websocket/server.js +++ b/atcheck-websocket/server.js @@ -2,10 +2,6 @@ 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) { @@ -44,7 +40,8 @@ var server = https.createServer({ response.end("Undefined request ."); } }); +var websocket_port = 8888; +const wss = new WebSocket.Server({port: websocket_port}); -var http_port = 8889; -server.listen(http_port); -console.log("HTTP server running on port " + http_port); +server.listen(websocket_port); +console.log("HTTP server running on port " + websocket_port);