@@ -26,17 +26,17 @@ and then in modules implementing task queues and connection pools.
26
26
$ npm install --save loopback-context cls-hooked
27
27
```
28
28
29
- Make sure you are running on a Node version supported by this module!
30
- Please check the output of ` npm install ` and make sure there are
31
- no ` engine ` related warnings.
29
+ Make sure you are running on a Node.js version supported by this module
30
+ ( ` ^4.5 ` , ` ^5.10 ` or ` ^6.0 ` ). When installing, check the output of ` npm install `
31
+ and make sure there are no ` engine ` related warnings.
32
32
33
33
## Usage
34
34
35
35
### Setup cls-hooked
36
36
37
37
To minimize the likelihood of loosing context in your application, you should
38
38
ensure that ` cls-hooked ` is loaded as the first module of your application, so
39
- that it can wrap certain Node APIs before any other modules start using these
39
+ that it can wrap certain Node.js APIs before any other modules start using these
40
40
APIs.
41
41
42
42
Our recommended approach is to add ` -r cls-hooked ` to node's list of
@@ -125,7 +125,7 @@ chain (before the middleware that depends on
125
125
invoked multiple times on the same request and returns immediately in
126
126
subsequent runs.**
127
127
128
- Here’s sample code which uses a middleware function to place the currently
128
+ Here is a snippet using a middleware function to place the currently
129
129
authenticated user into the context so that remote methods may use it:
130
130
131
131
** server/middleware/store-current-user.js**
@@ -158,7 +158,7 @@ module.exports = function(options) {
158
158
{
159
159
"initial" : {
160
160
"loopback-context#per-request" : {}
161
- }
161
+ },
162
162
"auth" : {
163
163
"loopback#token" : {}
164
164
},
0 commit comments