spirit-middleware

1.0.1 • Public • Published

Spirit Middleware

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.

Usage

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 .

Readme

Keywords

Package Sidebar

Install

npm i spirit-middleware

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • alexray