summaryrefslogtreecommitdiffstats
path: root/lib/cli/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli/server.js')
-rw-r--r--lib/cli/server.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/cli/server.js b/lib/cli/server.js
index 936ff4e..555bbb7 100644
--- a/lib/cli/server.js
+++ b/lib/cli/server.js
@@ -14,12 +14,20 @@ function Server() {
}
util.inherits(Server, events.EventEmitter);
-// Return true if the server is running
+/**
+ Return true if the server is running
+
+ @return {Boolean}
+*/
Server.prototype.isRunning = function() {
return !!this.running;
};
-// Stop the server
+/**
+ Stop the server
+
+ @return {Promise}
+*/
Server.prototype.stop = function() {
var that = this;
if (!this.isRunning()) return Promise();
@@ -40,6 +48,11 @@ Server.prototype.stop = function() {
return d.promise;
};
+/**
+ Start the server
+
+ @return {Promise}
+*/
Server.prototype.start = function(dir, port) {
var that = this, pre = Promise();
port = port || 8004;