diff --git a/atcheck-websocket/server.js b/atcheck-websocket/server.js index d62085e..54fd923 100644 --- a/atcheck-websocket/server.js +++ b/atcheck-websocket/server.js @@ -1,5 +1,5 @@ const WebSocket = require('ws'); -var https = require('https'); +var http = require('http'); const fs = require('fs'); var websocket_port = 8888; @@ -12,11 +12,11 @@ wss.on('connection', function connection(ws) { console.log(ws); lookup[ws.protocol] = ws; }); - -var server = https.createServer({ - cert: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/cert.pem'), - key: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/privkey.pem') -}, function (request, response) { +/*{ + cert: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/cert.pem'), + key: fs.readFileSync('/etc/letsencrypt/live/atcheck.projektstudencki.pl/privkey.pem') + }, */ +var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text\plain"}); request.setEncoding('utf8'); @@ -46,6 +46,6 @@ var server = https.createServer({ } }); -var https_port = 8889; -server.listen(https_port); -console.log("HTTP server running on port " + https_port); +var http_port = 8889; +server.listen(http_port); +console.log("HTTP server running on port " + http_port);