Skip to content

Commit

Permalink
chore(docs): make it clear that session() requires cookie()
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco130 authored Sep 10, 2023
1 parent 7ebc513 commit 9ae05a9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/middleware/session/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ This middleware uses the [Web Crypto API](https://w3c.github.io/webcrypto/) whic
## Usage

```ts
import { cookie } from "@hattip/cookie";
import { session, SignedCookieStore } from "@hattip/session";
import { json } from "@hattip/response";

// session() requires cookie() or
// getSessionId option to be set to read
// the session ID from somewhere else
app.use(cookie());

app.use(
session({
// Session store
Expand Down

0 comments on commit 9ae05a9

Please sign in to comment.