Stop Service

Introduction


The Composer provides the ability to stop the deployed service.

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

Usage


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

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