apptasks
AppTasks allows you to load and run functions before your application starts and after your application ends.
Last updated 4 years ago by kokujin .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apptasks 
SYNC missed versions from official npm registry.

AppTasks

AppTasks allows ypu to load and start functions before your application starts and after your application ends.

Install

$ npm install --save apptasks

Usage

const AppTasks = require('apptasks');

const apptasks = new AppTasks({
    preFolder: 'folder/for/start/functions',
    postFolder: 'folder/for/post/functions'
});

API

apptasks(options)

options

preFolder

Type: string
Default: pre

Add functions that should be run before your application to this folder

postFolder

Type: string
Default: post

Add functions that should be run when your application ends to this folder.

DEBUG

Type: boolean
Default: false

Set this option to true to log configuration, pre/post functions and run sequence.

Pre and post function signature

The functions should have the signature, Use the first return parameter to return null or an error.

function moduleName(cb) {
    cb(null, 'Result');
}

module.exports = moduleName;

License

MIT © kokujin

Current Tags

  • 1.0.0                                ...           latest (4 years ago)

9 Versions

  • 1.0.0                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 1
Last Month 7
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |