Commit 669143a5 authored by Indrek Jentson's avatar Indrek Jentson Committed by Indrek Jentson
Browse files

Koodi parandused


Signed-off-by: default avatarIndrek Jentson <indrek.jentson@cgi.com>
parent e165c1f3
...@@ -45,7 +45,7 @@ function ArchiveExtractor() { ...@@ -45,7 +45,7 @@ function ArchiveExtractor() {
logger.debug('Check for callback. count:' + count + ' isClosed: ' + isClosed); logger.debug('Check for callback. count:' + count + ' isClosed: ' + isClosed);
if (count == 0 && isClosed == true) { if (count === 0 && isClosed === true) {
session.message = Session.messages.OK; session.message = Session.messages.OK;
return callback(null, session); return callback(null, session);
} }
...@@ -58,7 +58,7 @@ function ArchiveExtractor() { ...@@ -58,7 +58,7 @@ function ArchiveExtractor() {
.pipe(unzip.Parse()) .pipe(unzip.Parse())
.on('entry', function(entry) { .on('entry', function(entry) {
count++; count++;
var isFile = ('File' == entry.type); var isFile = ('File' === entry.type);
var savePath = SessionService.getStorePath(session.id); var savePath = SessionService.getStorePath(session.id);
var fullpath = path.join(savePath, entry.path); var fullpath = path.join(savePath, entry.path);
......
...@@ -17,7 +17,11 @@ var bodyParser = require('body-parser'); ...@@ -17,7 +17,11 @@ var bodyParser = require('body-parser');
var multer = require('multer'); var multer = require('multer');
var cluster = require('cluster'); var cluster = require('cluster');
var http = require('http'); var http = require('http');
var config = require('./../config'); try {
var config = require('./../config');
} catch (e) {
console.error('Can not read configuration: ' + e.toString());
}
var controllers = require('./../controllers/index'); var controllers = require('./../controllers/index');
var routerMiddleware = require('./../middlewares/router'); var routerMiddleware = require('./../middlewares/router');
var errorhandlerMiddleware = require('./../middlewares/errorhandler'); var errorhandlerMiddleware = require('./../middlewares/errorhandler');
...@@ -27,7 +31,7 @@ var cleanerService = require('./../src/service/cleanerService'); ...@@ -27,7 +31,7 @@ var cleanerService = require('./../src/service/cleanerService');
var installService = require('./../src/service/integration/installService'); var installService = require('./../src/service/integration/installService');
app.set('views', path.join(__base, 'views'));// view engine setup app.set('views', path.join(__base, 'views'));// view engine setup
app.set('view engine', 'jade');// view engine setup app.set('view engine', 'pug');// view engine setup
app.use(express.static(__base + '/public')); app.use(express.static(__base + '/public'));
log4js.configure(config.log4js); log4js.configure(config.log4js);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment