Is it possible to have OS X notify my node.js app when the computer is entering sleep or shutting down? Seems like it should be, but I haven't been able to find anything node.js related. I did find this but it's talking about Cocoa apps. Maybe I could have some other app (like Cocoa) receive the sleep notification and pass that to node.js?
I'd love to hear any suggestions that might point me in the right direction.
OSmodule where I would expect this to be. My guess is that you could use node'sChild Processto spawn a shell (or some other language) script listening for this that then notifies the parent node process. – Matthew Herbst 8 mins ago