The server side request handler for digger
A very simple middleware chain for plain rpc requests
$ npm install digger-warehouse --save
The warehouse is a function through which you pass an object (packet), a callback (responder) and a next (classic middleware style).
An example of a basic warehouse setup:
var Warehouse = ;var warehouse = ;// middleware means we can augment the request and pass it down the chainwarehousewarehouse
To call this - it is just a case of calling the warehouse function with a request:
// I was here: 23
A warehouse can be used with plain old packets but it can also simulate REST requests and match the url and method.
var warehouse = ;// only requests with a url field of '/api/v1' will run this functionwarehouse// only requests that are posted here will be run - params are extractedwarehouse