Preloading of the experiments

This commit is contained in:
Thomas FORGIONE
2015-09-28 11:00:52 +02:00
parent 322fe99ea9
commit 96cb58b6f6
7 changed files with 121 additions and 20 deletions

View File

@@ -9,6 +9,7 @@ var Colors = Object.freeze({
BLUE: '\033[34m',
MAGENTA: '\033[35m',
CYAN: '\033[36m',
ORANGE: '\033[38;5;202m',
});
var isDev = require('express')().get('env') === 'development';
@@ -35,8 +36,8 @@ Log.request = function(req, res, time) {
'[REQ] ' + new Date() + ' ' +
(req.headers['x-forwarded-for'] || req.connection.remoteAddress) +
(time !== undefined ? (' in ' + (" " + time).slice(-6) + ' ms') : '') +
' : ' + req.url ,
Colors.CYAN
' : ' + (req.static && req.url !== '/favicon.ico' ? '/static' + req.url : req.url),
req.static ? Colors.YELLOW : Colors.CYAN
);
}
};
@@ -76,7 +77,7 @@ if (isDev) {
Log.debug = function(info) {
log(
'[DBG] ' + (info !== undefined ? info : ''),
Colors.YELLOW
Colors.ORANGE
);
};
} else {