Add big fat warning to README

Recommend against using this module.
This commit is contained in:
Miroslav Bajtoš 2016-08-01 15:20:11 +02:00
parent 28e99e5e2c
commit 62f6871089
1 changed files with 16 additions and 1 deletions

View File

@ -3,6 +3,19 @@
Current context for LoopBack applications, based on
node-continuation-local-storage.
## WARNING
The module node-continuation-local-storage is known to have many problems,
see e.g. [issue #59](https://github.com/othiym23/node-continuation-local-storage/issues/59).
As a result, loopback-context does not work in many situations, as can be
seen from issues reported in LoopBack's
[issue tracker](https://github.com/strongloop/loopback/issues?utf8=%E2%9C%93&q=is%3Aissue%20getCurrentcontext).
**We recommend AGAINST using this module.**
If you are running on Node v6, you can try the new alternative
[cls-hooked](https://github.com/Jeff-Lewis/cls-hooked).
## Usage
1) Add `per-request` middleware to your
@ -31,4 +44,6 @@ MyModel.myMethod = function(cb) {
});
```
See also https://docs.strongloop.com/display/APIC/Using+current+context
See the official LoopBack
[documentation](https://docs.strongloop.com/display/APIC/Using+current+context)
for more details.