Stop Daemon

Introduction


The Composer provides the ability to stop the deployed daemon.

You can invoke this functionality by calling stopDaemon and pass the daemon name to it as a parameter.

Usage


Stop Daemon Example
//assuming that the daemon name is "myDaemon" and provided in config.js


//deploy the daemon
composer.deploy(__dirname + "/.config.js", function (error) {
	
	//call stop daemon
	composer.stopDaemon("myDaemon", function(error){
		if(error){
	   		console.log(error);   
		}
		else{
			console.log("daemon stopped");
		}
	});
});