Permalink
Browse files

Improve the README

Change-Id: Ied54f727d265ebd80a6a029de01de3de7f3b1e5e
  • Loading branch information...
1 parent b8ef4ff commit 7e8e69a04e276ecaa4c7f9a08264c58c60e66db8 @creationix creationix committed Dec 26, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 README.markdown
View
@@ -4,6 +4,14 @@ Stack is a minimal http module system for node.js.
Basically it's the core idea of connect but in a standalone and super minimal stack function.
+## Install
+
+If you use npm, then install stack via npm. Also, remember to put it as a dependency in your own project's package.json file.
+
+ npm install stack
+
+If you don't use npm (Like you're on a phone), then simply copy the single file `stack.js` somewhere you can get to it.
+
## Example
http.createServer(require('stack')(
@@ -12,6 +20,8 @@ Basically it's the core idea of connect but in a standalone and super minimal st
//...
)).listen(8080);
+## Explanation
+
As you can see, it takes a list of handler functions and will chain them up for you.
Each handler needs to be of the form:

0 comments on commit 7e8e69a

Please sign in to comment.