Skip to content

Commit 60beaa6

Browse files
author
Christian Potdevin
committed
docs: fastify plugin registration should be awaited
Fastify plugin registration happens asynchronously and should be awaited. Closes #2265
1 parent 7d3515a commit 60beaa6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

content/techniques/cookies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const app = await NestFactory.create<NestFastifyApplication>(
7171
AppModule,
7272
new FastifyAdapter(),
7373
);
74-
app.register(fastifyCookie, {
74+
await app.register(fastifyCookie, {
7575
secret: 'my-secret', // for cookies signature
7676
});
7777
```

content/techniques/sessions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const app = await NestFactory.create<NestFastifyApplication>(
7777
AppModule,
7878
new FastifyAdapter(),
7979
);
80-
app.register(secureSession, {
80+
await app.register(secureSession, {
8181
secret: 'averylogphrasebiggerthanthirtytwochars',
8282
salt: 'mq9hDxBVDbspDR6n',
8383
});

0 commit comments

Comments
 (0)