From 79fa8805b2b64d1bf4c62170dbae45544f61590a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Fri, 9 Mar 2018 18:22:41 +0100 Subject: [PATCH] Fixed http2 issue --- server/app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server/app.js b/server/app.js index d8713945..f0cbf0f3 100644 --- a/server/app.js +++ b/server/app.js @@ -1,10 +1,10 @@ var cluster = require('cluster'), - net = require('net'), - path = require('path'), - //publicPath = path.join(__dirname, 'public'), - http = require('http'), - port = 8080, - num_processes = require('os').cpus().length; +net = require('net'), +path = require('path'), +//publicPath = path.join(__dirname, 'public'), +http = require('http'), +port = 8080, +num_processes = require('os').cpus().length; publicPath = path.join(__dirname, 'public'); pathThumbnails = __dirname; @@ -78,10 +78,10 @@ function startSingle(clustered, redis_enabled) { ca: ca }; var https = require('https'); - server = require('http2').createSecureServer(credentials, routingFunction); + server = https.Server(credentials, routingFunction); } catch(err){ console.log("Starting without https (probably on localhost)"); - server = require('http2').createServer(routingFunction); + server = http.createServer(routingFunction); } if(clustered) {