From 4fb88537cb73aa844376f13d8de40fa7c4a3e3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Mon, 5 Feb 2018 19:59:41 +0100 Subject: [PATCH] Trying to fix error --- server/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/app.js b/server/app.js index 2e640a33..4186f04d 100644 --- a/server/app.js +++ b/server/app.js @@ -57,6 +57,8 @@ function startClustered(redis_enabled) { function startSingle(clustered, redis_enabled) { var client = require('./client.js'); var admin = require('./admin.js'); + var server; + var admin_server; try { var cert_config = require(path.join(path.join(__dirname, 'config'), 'cert_config.js')); var fs = require('fs'); @@ -71,14 +73,16 @@ function startSingle(clustered, redis_enabled) { var https = require('https'); server = https.Server(credentials, client); + admin_server = https.Server(credentials, admin); } catch(err){ console.log("Starting without https (probably on localhost)"); server = http.Server(client); + admin_server = http.Server(admin); //add = ",http://localhost:80*,http://localhost:8080*,localhost:8080*, localhost:8082*,http://zoff.dev:80*,http://zoff.dev:8080*,zoff.dev:8080*, zoff.dev:8082*"; } - admin_server = http.Server(admin); + if(clustered) { app