(res, props)
| 87 | ); |
| 88 | |
| 89 | async function renderReactTree(res, props) { |
| 90 | await waitForWebpack(); |
| 91 | const manifest = readFileSync( |
| 92 | path.resolve(__dirname, '../build/react-client-manifest.json'), |
| 93 | 'utf8' |
| 94 | ); |
| 95 | const moduleMap = JSON.parse(manifest); |
| 96 | const {pipe} = renderToPipeableStream( |
| 97 | React.createElement(ReactApp, props), |
| 98 | moduleMap |
| 99 | ); |
| 100 | pipe(res); |
| 101 | } |
| 102 | |
| 103 | function sendResponse(req, res, redirectToId) { |
| 104 | const location = JSON.parse(req.query.location); |
no test coverage detected