[Pkg-javascript-commits] [node-static] 73/151: include cli notes in README.md

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:17:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository node-static.

commit 307f3a403d01d73166ab6cc487ce9e8a873b0432
Author: Aaron Stacy <aaron.r.stacy at gmail.com>
Date:   Sun Aug 26 00:13:20 2012 -0500

    include cli notes in README.md
---
 README.md | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 013bde1..c0d5564 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ node-static understands and supports *conditional GET* and *HEAD* requests.
 node-static was inspired by some of the other static-file serving modules out there,
 such as node-paperboy and antinode.
 
-synopsis
+Synopsis
 --------
 
     var static = require('node-static');
@@ -139,3 +139,32 @@ example: `{ 'X-Hello': 'World!' }`
 
 > defaults to `{}`
 
+Command Line Interface
+----------------------
+
+`node-static` also provides a CLI.
+
+### Installation #
+
+    $ npm install -g node-static
+
+### Example Usage #
+
+    # serve up the current directory
+    $ static
+    serving "." at http://127.0.0.1:8080
+
+    # serve up a different directory
+    $ static public
+    serving "public" at http://127.0.0.1:8080
+
+    # specify additional headers (this one is useful for development)
+    $ static -H '{"Cache-Control": "no-cache, must-revaliate"}'
+    serving "." at http://127.0.0.1:8080
+
+    # set cache control max age
+    $ static -c 7200
+    serving "." at http://127.0.0.1:8080
+
+    # show help message, including all options
+    $ static -h

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git



More information about the Pkg-javascript-commits mailing list