https://github.com/strongloop/loopback-phase
Phase management for LoopBack applications.
https://github.com/strongloop/loopback-phase
Last synced: 9 months ago
JSON representation
Phase management for LoopBack applications.
- Host: GitHub
- URL: https://github.com/strongloop/loopback-phase
- Owner: strongloop
- License: other
- Created: 2014-10-10T17:13:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-03-06T08:54:21.000Z (almost 6 years ago)
- Last Synced: 2025-04-22T13:19:35.418Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 7
- Watchers: 29
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# LoopBack Phase
**⚠️ LoopBack 3 is in Maintenance LTS mode, only critical bugs and critical
security fixes will be provided. (See
[Module Long Term Support Policy](#module-long-term-support-policy) below.)**
We urge all LoopBack 3 users to migrate their applications to LoopBack 4 as
soon as possible. Refer to our
[Migration Guide](https://loopback.io/doc/en/lb4/migration-overview.html)
for more information on how to upgrade.
## Overview
Hook into the various phases of a LoopBack application.
## Installation
npm install loopback-phase
## Usage
```js
var PhaseList = require('loopback-phase').PhaseList;
var phases = new PhaseList();
phases.add('first');
phases.add('second');
phases.add('third');
var first = phases.find('first');
var second = phases.find('second');
first.use(function(ctx, cb) {
console.log('this is the first phase!');
cb();
});
second.use(function(ctx, cb) {
console.log('this is the second phase!');
cb();
});
phases.run(ctx);
```
See [API docs](http://apidocs.strongloop.com/loopback-phase/) for
complete API reference.
## License
[MIT](LICENSE).
## Module Long Term Support Policy
This module adopts the [Module Long Term Support (LTS)](http://github.com/CloudNativeJS/ModuleLTS) policy, with the following End Of Life (EOL) dates:
| Version | Status | Published | EOL |
| ------- | --------------- | --------- | -------- |
| 3.x | Maintenance LTS | Dec 2016 | Dec 2020 |
| 1.x | End-of-Life | Oct 2014 | Apr 2019 |
Learn more about our LTS plan in the [docs](https://loopback.io/doc/en/contrib/Long-term-support.html).