thaliproject / Thali_CordovaPlugin

Thali p2p plugin
MIT License
226 stars 44 forks source link

Lifecycle hooks for node.js #430

Open yaronyg opened 8 years ago

yaronyg commented 8 years ago

We need to know when our node.js code is about to be put into the background or killed so that we can do things like gently shut down Express, flush data out of RAM onto disk, etc. We should also expose these hooks as events that developers can subscribe to.

The native hooks for this will be implemented in #409 and #410

yaronyg commented 8 years ago

We actually get the basic hooks from JXcore as it is and they are good enough for our current usage. Once we want to do things like use background mode in iOS we will need something more sophisticated.