You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/src/server/docs/04-helpers.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Helpers
3
3
description: ovr route helpers.
4
4
---
5
5
6
-
ovr provides helpers to encapsulate a route, allowing you to easily create a route in a separate module from `App`.
6
+
ovr provides helpers to encapsulate a route, allowing you to easily create a route in a separate module from `App`. Helpers are the best way to create pages and API endpoints for an ovr application.
Copy file name to clipboardExpand all lines: apps/docs/src/server/docs/05-context.md
+25-9Lines changed: 25 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,14 +7,14 @@ description: Understanding the ovr request context.
7
7
8
8
## Request information
9
9
10
-
Access information about the current request such as the `url` or [`params`](/06-routing#parameters).
10
+
Access information about the current request such as the [`url`](https://developer.mozilla.org/en-US/docs/Web/API/URL) or [`params`](/06-routing#parameters).
Memoize a function to dedupe async operations and cache the results. See [memoization](/07-memo) for more details.
61
+
58
62
```tsx
59
63
app.get("/api/:id", (c) => {
60
-
// memoize a function to dedupe async operations and cache the results
61
64
c.memo(fn);
65
+
});
66
+
```
67
+
68
+
### Entity tag
69
+
70
+
Generates an [entity tag](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag) from a hash of the string provided. If the tag matches, the response will be set to [`304: Not Modified`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/304) and the funciton will return `true`.
0 commit comments