Browse Source

Compress output

dev/git-series/gccdum
Matt Godbolt 8 years ago
parent
commit
1fba6aec51
  1. 4
      app.js
  2. 1
      lib/compile.js
  3. 1
      package.json

4
app.js

@ -210,10 +210,12 @@ findCompilers().then(function (compilers) {
sFavicon = require('serve-favicon'),
sStatic = require('serve-static'),
bodyParser = require('body-parser'),
logger = require('morgan');
logger = require('morgan'),
compression = require('compression');
webServer
.use(logger('combined'))
.use(compression())
.use(sFavicon('static/favicon.ico'))
.use(sStatic('static', {maxAge: staticMaxAgeMs}))
.use(bodyParser.urlencoded({extended: true}))

1
lib/compile.js

@ -230,6 +230,7 @@ function compileHandler(compilers) {
var filters = req.body.filters;
compileObj.compile(source, compiler, options, filters).then(
function (result) {
res.set('Content-Type', 'application/json');
res.end(JSON.stringify(result));
},
function (error) {

1
package.json

@ -17,6 +17,7 @@
"main": "./app.js",
"dependencies": {
"body-parser": "1.10.x",
"compression": "1.3.x",
"express": "4.11.x",
"fs-extra": "0.8.x",
"lru-cache": "2.5.x",

Loading…
Cancel
Save