-
-
Save xnimorz/2a62834971f8fd7911fd809c2e8bbd38 to your computer and use it in GitHub Desktop.
ssr example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default (ctx) => { | |
| let url; | |
| try { | |
| const initialState = ctx.request.body.initialState; | |
| url = ctx.request.body.url; | |
| const render = renderAndLogFabric(ctx); | |
| ctx.body = render(getOrCreateStore(initialState)); | |
| } catch (error) { | |
| logCtxError(Логируем ошибку); | |
| ctx.throw(INTERNAL_SERVER_ERROR, getStatusText(INTERNAL_SERVER_ERROR, error)); | |
| } | |
| }; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment