mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fixed http2 issue
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
var cluster = require('cluster'),
|
var cluster = require('cluster'),
|
||||||
net = require('net'),
|
net = require('net'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
//publicPath = path.join(__dirname, 'public'),
|
//publicPath = path.join(__dirname, 'public'),
|
||||||
http = require('http'),
|
http = require('http'),
|
||||||
port = 8080,
|
port = 8080,
|
||||||
num_processes = require('os').cpus().length;
|
num_processes = require('os').cpus().length;
|
||||||
|
|
||||||
publicPath = path.join(__dirname, 'public');
|
publicPath = path.join(__dirname, 'public');
|
||||||
pathThumbnails = __dirname;
|
pathThumbnails = __dirname;
|
||||||
@@ -78,10 +78,10 @@ function startSingle(clustered, redis_enabled) {
|
|||||||
ca: ca
|
ca: ca
|
||||||
};
|
};
|
||||||
var https = require('https');
|
var https = require('https');
|
||||||
server = require('http2').createSecureServer(credentials, routingFunction);
|
server = https.Server(credentials, routingFunction);
|
||||||
} catch(err){
|
} catch(err){
|
||||||
console.log("Starting without https (probably on localhost)");
|
console.log("Starting without https (probably on localhost)");
|
||||||
server = require('http2').createServer(routingFunction);
|
server = http.createServer(routingFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(clustered) {
|
if(clustered) {
|
||||||
|
|||||||
Reference in New Issue
Block a user