Repository navigation
|
I'm looking for a "proper" way of sending backend data to frontend when serving the view. I know many templating engines do this, but is there a way to do it frontend-agnosticly? Context.state seems to be for this exact purpose if I understand the docs correctly, but the doc doesn't go into how to retrieve this data on the frontend. |
Answered by
kitsonk
Aug 9, 2023
Replies: 1 comment
|
Oak is an http server framework, completely unopinionated and agnostic to what goes into a response. A common pattern for sending data over HTTP would be to create RESTful services on the server, but this is only one approach to sending data to the client, of which oak has no direct opinion about how that is accomplished. |
0 replies
Answer selected by
kitsonk
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oak is an http server framework, completely unopinionated and agnostic to what goes into a response.
A common pattern for sending data over HTTP would be to create RESTful services on the server, but this is only one approach to sending data to the client, of which oak has no direct opinion about how that is accomplished.