File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,38 @@ We have removed the following current-context-related APIs:
162162 - ` loopback .createContext `
163163 - ` loopback .runInContext `
164164
165- Additionaly , ` loopback#context` middleware and ` remoting .context ` server
165+ Additionally , ` loopback#context` middleware and ` remoting .context ` server
166166config were removed too.
167167
168+ #### Upgrading from 2.x to 3.x
169+
170+ When upgrading from LoopBack 2.x, you need to disable or remove
171+ ` remoting .context ` configuration in your server config.
172+
173+ ` ` ` js
174+ {
175+ " remoting" : {
176+ " context" : false , // or remove completely
177+ // etc.
178+ },
179+ // etc.
180+ }
181+ ` ` `
182+
183+ Without this change, you will see the following error on the first HTTP request
184+ received:
185+
186+ ` ` `
187+ Unhandled error for request GET / api/ Users:
188+ Error : remoting .context option was removed in version 3.0 .
189+ See https: // docs.strongloop.com/display/APIC/Using%20current%20context for more
190+ details.
191+ at restApiHandler (... / node_modules/ loopback/ server/ middleware/ rest .js : 44 : 15 )
192+ at Layer .handle [as handle_request] (... / node_modules/ express/ lib/ router/ layer .js : 95 : 5 )
193+ ` ` `
194+
195+ #### Setting up "current context" in 3.x
196+
168197To setup "current context" feature in your LoopBack 3.x application, you
169198should use [loopback-context](https://www.npmjs.com/package/loopback-context)
170199module:
You can’t perform that action at this time.
0 commit comments