Skip to content

Commit

Permalink
Fix @fastify/cookies example
Browse files Browse the repository at this point in the history
replace () => fastifyCookie with fastifyCookie, because first example doesn't seem to work
  • Loading branch information
havrydotdev authored Sep 19, 2023
1 parent ed436d8 commit 423b92b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions content/techniques/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(),
);
await app.register(() => fastifyCookie, {
secret: 'my-secret', // for cookies signature
});
await app.register(fastifyCookie);
```

With this in place, you can now read cookies from within the route handlers, as follows:
Expand Down

0 comments on commit 423b92b

Please sign in to comment.