MCPcopy Create free account
hub / github.com/BuilderIO/framework-benchmarks / onShellReady

Function onShellReady

frameworks/react-ssr-node/http.jsx:24–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 .createServer(function (req, res) {
23 const stream = renderToPipeableStream(<App />, {
24 onShellReady() {
25 // The content above all Suspense boundaries is ready.
26 // If something errored before we started streaming, we set the error code appropriately.
27 res.statusCode = didError ? 500 : 200;
28 res.setHeader('Content-type', 'text/html');
29 res.setHeader('Cache-Control', 'no-transform'); // set to match the Deno benchmark, which requires this for an apples to apples comparison
30 stream.pipe(res);
31 },
32 onError(err) {
33 didError = true;
34 console.error(err);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected