Skip to content

Commit

Permalink
doc: pageContext.runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Dec 11, 2024
1 parent abe5988 commit 942be1d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/vike-node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,16 @@ app.use(
```

> [!NOTE]
> `vike-node` uses [universal-middleware](https://universal-middleware.dev/)
> and automatically adds the universal context to [`pageContext`](https://vike.dev/pageContext).
> `vike-node` uses [universal-middleware](https://universal-middleware.dev/) under the hood.
>
> You can find details on `RuntimeAdapter` in the [documentation](https://universal-middleware.dev/reference/runtime-adapter).
> [!NOTE]
> `runtime` is already available at `pageContext.runtime`.
>
> So even without the custom `pageContext` function above,
> one could also retrieve the user from `pageContext.runtime.req.user` in any Vike hook.
<br/>

## Standalone build
Expand Down

0 comments on commit 942be1d

Please sign in to comment.