Skip to content

Commit deee283

Browse files
committed
docs(lifecycle-events): add windows limitations
1 parent 326ab2d commit deee283

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/fundamentals/lifecycle-events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ async onModuleInit() {
6666

6767
The `beforeApplicationShutdown()` and `onApplicationShutdown()` hooks are called in the **terminating** phase (in response to system signals such as `SIGTERM`). This feature is often used with [Kubernetes](https://kubernetes.io/), [Heroku](https://www.heroku.com/) or similar services.
6868

69+
> warning **warning** Due to inherent platform limitations, NestJS has limited support for Windows. You can expect SIGINT to work, as well as SIGBREAK and to some extent SIGHUP. However SIGTERM will never work on Windows because killing a process in the task manager is unconditional, i.e., there's no way for an application to detect or prevent it. [Here's some relevant documentation](http://docs.libuv.org/en/v1.x/signal.html) from libuv to learn more about what SIGINT, SIGBREAK etc. signify and what's supported on Windows. Also, see Node.js [documentation of Process Signal Events](https://nodejs.org/api/process.html#process_signal_events)
70+
6971
To use these hooks you must activate a listener which listens to shutdown signals.
7072

7173
```typescript

0 commit comments

Comments
 (0)