A simple http module system for node.js applications.
Stackr does not supply any middleware, it just provides an easy interface for composing a middleware stack.
Stackr can be required like any other node module:
var stackr = require'stackr';
You can construct a stack by passing middleware to the
stackr constructor as arguments:
var stack = stackrrequire'logger'require'static'root mount;
or by calling
use on the stack:
var stack = stackruserequire'logger'userequire'static'root mount;
Your stack can be used to create an http server:
Substacks provide a simple way to compose more complex stacks:
var substack = stackrsubstackrequire'logger';var stack = stackrsubstackrequire'auth';substackuserequire'static'root mount;
In the above example the execution order will be
auth because the entire substack will execute before anything that follows it in the outer stack.