Detect server restart with --watch ? #25601
Replies: 1 comment
-
|
Converted to an issue at #25609, let's continue there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to call
pglite.close()before the process exits to avoid corrupting my database, but every time I edit my code with--watchit gets corrupted and I have to delete/recreate my database.I used
Deno.addSignalListener('SIGINT', ...)to clean up (and also addedSIGTERM,SIGHUP, etc), but I can't figure out how to detect when the server will restart due to a code change when using --watch. I need to also call my cleanup function in that case. I think? I'm not completely sure if this is the issue or I'm running into a different bug.Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions