| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This library implement the middleware setup to setup your application. This provide you the ability to setup your application through severals async tasks.
This is a Node.js module available through the npm registry. Installation is done using the npm install command:
$ npm install middleware-setupTask 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 = MyTaskvar { 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
| Back | FazBrowse Home | New Git URL |