cloudcms-cli
Version:
Cloud CMS Command-Line client
43 lines (39 loc) • 1.32 kB
JavaScript
var helper = require("../../../helper");
var AbstractCommand = require("../../abstract");
class ApplicationStopCommand extends AbstractCommand
{
constructor()
{
super({
"group": "hosting",
"name": "stop",
"description": "Stops the deployed application",
"schema": {
"properties": [{
"name": "applicationId",
"type": "string",
"description": "Enter the application ID:",
"helper": "The ID of the application",
"required": true,
"args": ["application", "a"]
}, {
"name": "deploymentKey",
"type": "string",
"description": "Enter the deployment key:",
"helper": "The deployment key",
"required": false,
"default": "default",
"args": ["deployment", "d"]
}]
}
});
}
handle(options, callback)
{
// call workhorse function
helper.applicationDeploymentStop(options.applicationId, options.deploymentKey, function(err) {
callback(err);
});
}
}
module.exports = ApplicationStopCommand;