MCPcopy Create free account
hub / github.com/dailydotdev/apps / compressedJson

Function compressedJson

packages/world-cli/src/dev.js:68–78  ·  view source on GitHub ↗
(req, res, body)

Source from the content-addressed store, hash-verified

66};
67
68const 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
80const exists = (file) =>
81 access(file).then(

Callers 1

startDevFunction · 0.85

Calls 1

corsForFunction · 0.85

Tested by

no test coverage detected