Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion site/content/docs/04-preloading.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ So if the example above was `src/routes/blog/[slug].svelte` and the URL was `/bl
* `page.query.foo === 'bar'`
* `page.query.baz === true`

`session` is generated on the server by the `session` option passed to `sapper.middleware` (TODO this needs further documentation. Perhaps a server API section?)
`session` is generated on the server by the `session` option passed to `sapper.middleware`. For example:

```js
sapper.middleware({
session: (req, res) => ({
user: req.user
})
})
```


### Return value
Expand Down