|
|
@ -43,6 +43,7 @@ ExpressApp.start = function(opts) { |
|
|
|
next(); |
|
|
|
} |
|
|
|
app.use(allowCORS); |
|
|
|
app.enable('trust proxy'); |
|
|
|
|
|
|
|
var POST_LIMIT = 1024 * 100 /* Max POST 100 kb */ ; |
|
|
|
|
|
|
@ -50,15 +51,14 @@ ExpressApp.start = function(opts) { |
|
|
|
limit: POST_LIMIT |
|
|
|
})); |
|
|
|
|
|
|
|
if (!opts.disableLogs) { |
|
|
|
if (opts.disableLogs) { |
|
|
|
log.level = 'silent'; |
|
|
|
} else { |
|
|
|
// TODO access.log
|
|
|
|
//var accessLogStream = fs.createWriteStream(__dirname + '/access.log', {flags: 'a'})
|
|
|
|
//app.use(morgan('combined', {stream: accessLogStream}))
|
|
|
|
// app.use(require('morgan')('dev'));
|
|
|
|
|
|
|
|
app.use(require('morgan')(':remote-addr :date[iso] ":method :url" :status :res[content-length] :response-time ":user-agent" ')); |
|
|
|
} else { |
|
|
|
log.level = 'silent'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|