Would it be possible to add a some signal, e.g. SIGUSR2 before a restart to allow a micro server to perform some cleanup? nodemon does this: https://github.com/remy/nodemon/#controlling-shutdown-of-your-script
My use-case is a setInterval() that I want to call clearInterval() on each time micro-dev restarts the server. Right now I end up with one interval long running for every single start/restart of the server.
Would it be possible to add a some signal, e.g.
SIGUSR2before a restart to allow a micro server to perform some cleanup?nodemondoes this: https://github.com/remy/nodemon/#controlling-shutdown-of-your-scriptMy use-case is a
setInterval()that I want to callclearInterval()on each timemicro-devrestarts the server. Right now I end up with one interval long running for every single start/restart of the server.