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
{{ message }}
Repository navigation
Commit 65c907f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,8 +154,6 @@ const app = createApp()
154
154
155
155
Internally, Zeta uses [`rou3`](https://www.npmjs.com/package/rou3) to match routes. To add a path parameter, you can use `:name`, `**`, or `**:name`. For type safety, you can use a validation framework to define an object schema for the path parameters.
156
156
157
-
158
-
159
157
> Note that path parameters are strings. If your validation framework supports converting strings to other types, like with Zod's [`z.coerce`](https://zod.dev/api?id=coercion) or [`z.stringbool`](https://zod.dev/api?id=stringbool), you can use it to convert the string values to the desired type.
If your validation library is not supported by Zeta, you just need to implement your own [schema adapter](https://jsr.io/@aklinker1/zeta/doc/types/~/SchemaAdapter):
Copy file name to clipboardExpand all lines: docs/request-life-cycle.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,19 +35,18 @@ There are two types of hooks: global and isolated.
35
35
36
36
-**Global**
37
37
38
-
These hooks are registered on the final, top-level app, regardless of where they are defined on a top-level or child app. They always run for every request that hits the server. Use these for cross-cutting concerns like logging or authentication.
38
+
These hooks are registered on the final, top-level app, regardless of where they are defined on a top-level or child app. They always run for every request that hits the server. Use these for cross-cutting concerns like logging or authentication.
39
39
40
40
-**Isolated**
41
41
42
-
These hooks only apply to routes defined on the _same app instance_, _after_ the hook is added. They are perfect for setting up context or running middleware specific to a group of routes (e.g., a [plugin](/composing-apps#plugins)).
42
+
These hooks only apply to routes defined on the _same app instance_, _after_ the hook is added. They are perfect for setting up context or running middleware specific to a group of routes (e.g., a [plugin](/composing-apps#plugins)).
43
43
44
44
## Hooks
45
45
46
46
### `onGlobalRequest`
47
47
48
48
Called as soon as a request is made to the app.
49
49
50
-
51
50
Return value is shallow merged into the `ctx` object for future callbacks.
0 commit comments