Skip to content

Commit

Permalink
Improve the README
Browse files Browse the repository at this point in the history
Change-Id: Ied54f727d265ebd80a6a029de01de3de7f3b1e5e
  • Loading branch information
creationix committed Dec 26, 2010
1 parent b8ef4ff commit 7e8e69a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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')(
Expand All @@ -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:
Expand Down

0 comments on commit 7e8e69a

Please sign in to comment.