From 4087cf660152885304fbd9bbe742e87cb9088055 Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Tue, 17 Jun 2014 09:52:26 +0100 Subject: [PATCH] docs --- README.md | 5 +++-- bin/ws.js | 3 ++- lib/cli-options.js | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2d635d3..6f26442 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,9 @@ $ ws --help Server -p, --port Web server port --f, --log-format Access log format, written to stdout. Use one of - 'none', 'dev', 'default', 'short', 'tiny' or 'logstalgia' +-f, --log-format If a format is supplied an access log is written to stdout. If not, + a statistics view is displayed. Format options: 'none', 'dev', + 'default', 'short', 'tiny' or 'logstalgia'. -d, --directory Root directory, defaults to the current directory -c, --compress Enables compression -r, --refreshRate Statistics view refresh rate in ms. Defaults to 500. diff --git a/bin/ws.js b/bin/ws.js index 51f95b0..12f68a5 100755 --- a/bin/ws.js +++ b/bin/ws.js @@ -15,6 +15,7 @@ var dope = require("console-dope"), compress = require("compression"), cliOptions = require("../lib/cli-options"); +/* specify the command line arg definitions and usage forms */ var cli = cliArgs(cliOptions); var usage = cli.usage({ forms: [ @@ -96,7 +97,7 @@ if (argv.Misc.config){ /* --compress enables compression */ if (argv.Server.compress) app.use(compress()); - /* static file server including directory browsing support */ + /* enable static file server, including directory browsing support */ app.use(serveStatic(path.resolve(argv.Server.directory))) .use(directory(path.resolve(argv.Server.directory), { icons: true })); diff --git a/lib/cli-options.js b/lib/cli-options.js index 6967377..36a0be9 100644 --- a/lib/cli-options.js +++ b/lib/cli-options.js @@ -8,7 +8,7 @@ module.exports = [ }, { name: "log-format", alias: "f", type: String, - description: "Access log format, written to stdout. Use one of \n'none', 'dev', 'default', 'short', 'tiny' or 'logstalgia'" + description: "If a format is supplied an access log is written to stdout. If not, \na statistics view is displayed. Format options: 'none', 'dev',\n'default', 'short', 'tiny' or 'logstalgia'." }, { name: "directory", alias: "d", type: String,