| 111 | }; |
| 112 | |
| 113 | const renderError = err => { |
| 114 | const softTab = '    '; |
| 115 | const errTrace = isProdMode ? |
| 116 | `:<br><br><pre style="color:red">${softTab}${err.stack.replace(/\n/g, `<br>${softTab}`)}</pre>` : ''; |
| 117 | return renderFullPage(`Server Error${errTrace}`, {}); |
| 118 | }; |
| 119 | |
| 120 | // Server Side Rendering based on routes matched by React-router. |
| 121 | app.use((req, res, next) => { |
no test coverage detected