healthcheck-client.js
//connecet to server and register healthcheck
connecet to server and register healthcheck
connecet to server and register healthcheck
startListening()
	{	
		ipc.connectTo('watchdog', () => {
			ipc.of.watchdog.on('connect', () => {
				ipc.of.watchdog.emit('serviceRegister', ipc.config.id); 
				ipc.log("Connected to the watchdog server and registered.");
			});
			ipc.of.watchdog.on('Healthcheck', () => {
				ipc.of.watchdog.emit('OK'); 
				ipc.log("Healthcheck request received");
			});
		});	
	}
startListening ( ) { ipc . connectTo ( 'watchdog' , ( ) => { ipc . of . watchdog . on ( 'connect' , ( ) => { ipc . of . watchdog . emit ( 'serviceRegister' , ipc . config . id ) ; ipc . log ( "Connected to the watchdog server and registered." ) ; } ) ; ipc . of . watchdog . on ( 'Healthcheck' , ( ) => { ipc . of . watchdog . emit ( 'OK' ) ; ipc . log ( "Healthcheck request received" ) ; } ) ; } ) ; }
connecet to server and register healthcheck
connecet to server and register healthcheck
//connect to the watchdog server and send its own ID //send socket id to the server //reply to the health check call //respond to healthcheck call