I am running an web app and an helper app in parallel. The helper app updates some particular values in database used by the web app. This update happens at fixed time interval by using node-cron. Is it possible to notify admin when the helper app breaks?
Asked
Active
Viewed 194 times
2
-
Yes, it is possible. – wscourge Nov 09 '17 at 05:36
-
Can you please say how? – Hassan Nomani Nov 09 '17 at 05:44
1 Answers
1
You can use exit
event in helper app, like
process.on('exit', function() {
// handle
});

Mukesh Soni
- 1,119
- 3
- 13
- 23
-
Thanks it worked. Just wondering, can you provide me an idea so that I can notify in the front-end? – Hassan Nomani Nov 09 '17 at 06:00
-
@HassanNomani it should not be any different than other forms of client server communication. Use REST with request polling/ sockets etc. – Mukesh Soni Nov 09 '17 at 07:14
-