Skip to content

Commit bfe8192

Browse files
Merge pull request #2068 from MycroftHolmes1989/patch-1
docs(prisma) : Correct the sample code for Issues with enableShutdownHooks
2 parents 771e05b + 4512f43 commit bfe8192

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/recipes/prisma.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,12 +530,13 @@ Prisma interferes with NestJS `enableShutdownHooks`. Prisma listens for shutdown
530530
...
531531
import { PrismaService } from './services/prisma/prisma.service';
532532
...
533-
bootstrap() {
533+
async function bootstrap() {
534534
...
535535
const prismaService: PrismaService = app.get(PrismaService);
536536
prismaService.enableShutdownHooks(app)
537537
...
538538
}
539+
bootstrap()
539540
```
540541

541542
You can [read more](https://github.com/prisma/prisma/issues/2917#issuecomment-708340112) about Prisma handling of shutdown signal, and `beforeExit` event.

0 commit comments

Comments
 (0)