This is a small light weight middleware manager included in the Spirit Core static file generator.
It is used to call a series of functions in the order they are given.
install Spirit Core
npm install spirit-core
Pass it a middleware Function
to be called with two arguments Function
and the spirit Object
.
The first is a callback to continue to the next piece of middleware ( if one exists ) .
The second is the spirit Object
equipped with its own Api which you can find here.
var spiritCore = require( 'spirit-core' ) ;
spiritCore.use( someMiddleware ) ;
function someMiddleware ( next, spirit ) {
console.log( "Im using middleware !." ) ;
next( ) ;
}
Hand made in San Francisco California by Alex Ray .