DenoDDeno
Powered by
Overlord SupremeO
Denoβ€’17mo ago
Overlord Supreme

deno serve subcommand cleanup

When using the
deno serve
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
unload
event but adding an event handler for it doesn't seem to work.


User error, I needed to listen for
SIGINT
SIGINT
not
SIGTERM
SIGTERM
πŸ€¦β€β™‚οΈ
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

deno serve logs?
Jack MJJack M / help
2y ago
Deno.serve() + sharp + streams
functiondjFfunctiondj / help
2y ago
Does Deno Compile Support Deno Serve --parallel?
PirateSharkPPirateShark / help
9mo ago