1.1.2 • Published 5 years ago

middleware-setup v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Middleware-setup

Build Status Coverage Status

This library implement the middleware setup to setup your application. This provide you the ability to setup your application through severals async tasks.

Installation

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install middleware-setup

How it works

Implement Task

Task is one of the key. Implements

var { Task } = require('middleware-setup');

class MyTask extends Task {
  async execute() {
    // Do something cool here.
    return (42); // the right answer :)
  }
}

module.exports = MyTask

Setup the runner

var { runner } = require('middleware-setup');
var someTask = require('./customTask');

runner([
  // list of task
  new someTask(),
  new someTask()
])
  .then(() => console.log('Tasks done'))
  .catch(err => console.error('A task failed', err))

Some examples here

Credit

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.1.0-rc7

5 years ago

1.1.0-rc6

5 years ago

1.1.0-rc5

5 years ago

1.1.0-rc4

5 years ago

1.1.0-rc3

5 years ago

1.1.0-rc2

5 years ago

1.1.0-rc1

5 years ago

1.0.0-rc.1

5 years ago

1.0.0

5 years ago