mirror of https://github.com/BTCPrivate/z-nomp.git
Merge pull request #126 from z-classic/hellcatz-patch-5
Update website.js
This commit is contained in:
commit
b8e60519ae
|
@ -326,12 +326,8 @@ module.exports = function(logger){
|
||||||
res.send(500, 'Something broke!');
|
res.send(500, 'Something broke!');
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (typeof portalConfig.website.tlsOptions !== 'undefined' && !portalConfig.website.tlsOptions.enabled) {
|
if (portalConfig.website.tlsOptions && portalConfig.website.tlsOptions.enabled === true) {
|
||||||
app.listen(portalConfig.website.port, portalConfig.website.host, function () {
|
|
||||||
logger.debug(logSystem, 'Server', 'Website started on ' + portalConfig.website.host + ':' + portalConfig.website.port);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
var TLSoptions = {
|
var TLSoptions = {
|
||||||
key: fs.readFileSync(portalConfig.website.tlsOptions.key),
|
key: fs.readFileSync(portalConfig.website.tlsOptions.key),
|
||||||
cert: fs.readFileSync(portalConfig.website.tlsOptions.cert)
|
cert: fs.readFileSync(portalConfig.website.tlsOptions.cert)
|
||||||
|
@ -339,7 +335,11 @@ module.exports = function(logger){
|
||||||
|
|
||||||
https.createServer(TLSoptions, app).listen(portalConfig.website.port, portalConfig.website.host, function() {
|
https.createServer(TLSoptions, app).listen(portalConfig.website.port, portalConfig.website.host, function() {
|
||||||
logger.debug(logSystem, 'Server', 'TLS Website started on ' + portalConfig.website.host + ':' + portalConfig.website.port);
|
logger.debug(logSystem, 'Server', 'TLS Website started on ' + portalConfig.website.host + ':' + portalConfig.website.port);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
app.listen(portalConfig.website.port, portalConfig.website.host, function () {
|
||||||
|
logger.debug(logSystem, 'Server', 'Website started on ' + portalConfig.website.host + ':' + portalConfig.website.port);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(e){
|
catch(e){
|
||||||
|
|
Loading…
Reference in New Issue