express-resource
express-resource copied to clipboard
Nested Resources with Express-Namespace
When using both express-namespace and express resource, I get the following error when trying to implement nested resources:
.../node_modules/express-namespace/index.js:64
fn.namespace = curr;
^
TypeError: Cannot set property 'namespace' of undefined
at HTTPServer.
E.g var forums = app.resource('forums', require('resources/forums'), { load: Forum.get }); var threads = app.resource('threads', require('resources/threads'), { load: Thread.get });
forums.add(threads);
"express": "2.5.2", "express-resource": "0.2.4", "express-namespace": "0.0.4",
@azampagl commenting out line 64 on node_modules/express-namespace/index.js fixed it for me. I am not sure if this is the right fix for it.
I am also looking for express-resource
integration with express-namespace
. @supr, line 64 has probably changed since you fixed it!