Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

Code Block
languagejs
titleStop Daemon Example
linenumberstrue
//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");
		}
	});
});