From 9a1a6f2625612c18745957c4331be27dfdc2fb34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Wed, 27 Apr 2016 18:02:49 +0200 Subject: [PATCH] Document cli/server.js --- lib/cli/server.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/cli/server.js b/lib/cli/server.js index 936ff4e92..555bbb7e9 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;