1.0.0 • Published 8 years ago

apeman-middleware-delay v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

apeman-middleware-delay

Build Status Code Climate Code Coverage npm Version JS Standard

Middleware to delay

Installation

$ npm install apeman-middleware-delay --save

Usage

create an middleware instance and attach to server settings like $api of apeman projects.

Apemanfile.js

/** This is an example Apemanfile to use apeman-middleware-delay */

'use strict'

module.exports = {
  $pkg: { /* ... */ },
  $api: {
    /* ... */
    $middlewares: [
      require('apeman-middleware-delay')(100, {})
    ]
  }
}

Signature

apemanMiddlewareDelay(duration, options) -> function

Create an middleware function

Args
NameTypeDefaultDescription
durationNumberFunctionDelay duration
optionsObject{}Optional settings

License

This software is released under the MIT License.

Links