(req, res, body)
| 66 | }; |
| 67 | |
| 68 | const compressedJson = (req, res, body) => { |
| 69 | const zipped = gzipSync(JSON.stringify(body)); |
| 70 | res.writeHead(200, { |
| 71 | "content-type": "application/json", |
| 72 | "content-encoding": "gzip", |
| 73 | "content-length": zipped.length, |
| 74 | "cache-control": "no-store", |
| 75 | ...corsFor(req), |
| 76 | }); |
| 77 | res.end(zipped); |
| 78 | }; |
| 79 | |
| 80 | const exists = (file) => |
| 81 | access(file).then( |