Experimenting with using compress() in production.

This commit is contained in:
Nick Winter 2014-03-03 16:19:35 -08:00
parent c944e78271
commit df95e8c784
2 changed files with 5 additions and 1 deletions

View file

@ -47,6 +47,8 @@ setupExpressMiddleware = (app) ->
app.use(express.bodyParser())
app.use(express.methodOverride())
app.use(express.cookieSession({secret:'defenestrate'}))
if config.isProduction
app.use(express.compress())
setupPassportMiddleware = (app) ->
app.use(authentication.initialize())
@ -115,3 +117,5 @@ exports.setExpressConfigurationOptions = (app) ->
app.set('views', __dirname + '/app/views')
app.set('view engine', 'jade')
app.set('view options', { layout: false })
app.set('env', if config.isProduction then 'production' else 'development')
app.set('json spaces', 0)