(_req, res)
| 3 | import Root from './root' |
| 4 | |
| 5 | const handler: Connect.NextHandleFunction = async (_req, res) => { |
| 6 | const ssrHtml = ReactDomServer.renderToString(<Root />) |
| 7 | let html = await importHtml() |
| 8 | html = html.replace(/<body>/, `<body><div id="root">${ssrHtml}</div>`) |
| 9 | res.setHeader('content-type', 'text/html').end(html) |
| 10 | } |
| 11 | |
| 12 | export default handler |
| 13 |
nothing calls this directly
no test coverage detected