diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-27 18:02:49 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-27 18:02:49 +0200 |
commit | 9a1a6f2625612c18745957c4331be27dfdc2fb34 (patch) | |
tree | 7349f0f6fbcc210c446f2b431abbc4847c0ba53b /lib/cli | |
parent | e781d6d2b1705f44fcdd950f5541917fde41323f (diff) | |
download | gitbook-9a1a6f2625612c18745957c4331be27dfdc2fb34.zip gitbook-9a1a6f2625612c18745957c4331be27dfdc2fb34.tar.gz gitbook-9a1a6f2625612c18745957c4331be27dfdc2fb34.tar.bz2 |
Document cli/server.js
Diffstat (limited to 'lib/cli')
-rw-r--r-- | lib/cli/server.js | 17 |
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; |