deno serve subcommand cleanup

When using the deno serve subcommand, what is the expected way to run cleanup function before the process is ended? For example, I want to close a db connection on the unload event but adding an event handler for it doesn't seem to work. User error, I needed to listen for SIGINT not SIGTERM 🤦‍♂️
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?