You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to boot up my app with the memory store after running fine in couchdb it gives:
/Users/sakkaku/Dropbox/Projects/SecondLife/express/node_modules/resourceful/lib/resourceful/engines/memory.js:128
callback(null, result);
^
TypeError: object is not a function
at Memory.filter (/Users/sakkaku/Dropbox/Projects/SecondLife/express/node_modules/resourceful/lib/resourceful/engines/memory.js:128:5)
at Memory.request (/Users/sakkaku/Dropbox/Projects/SecondLife/express/node_modules/resourceful/lib/resourceful/engines/memory.js:59:8)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Of course that is the Memory.prototype.filter function. This fails at the declaration stage and not while executing the filter.
Example filter I have that breaks:
User = resourceful.define 'user', ->
@string 'name'
@filter 'getByName', (name) ->
return name: name
Is there a way to write filters that work in both environments? I found zero documentation on filters so any help would be appreciated.
Also you might want to add documentation on how to add auth to couchdb, I had to scour the source for a few minutes to solve that mystery. This is the method that looked the most 'correct'.
I created a PR which implements CouchDB-compatible filtering for the Memory engine: #143
If you need this functionality before the PR is accepted, feel free to use my fork: https://github.com/ssevertson/resourceful - the master branch contains both PR 143, and PR 142 (which resolves view name conflicts in CouchDB design documents). To use, add the following to your package.json:
When I try to boot up my app with the memory store after running fine in couchdb it gives:
Of course that is the Memory.prototype.filter function. This fails at the declaration stage and not while executing the filter.
Example filter I have that breaks:
Is there a way to write filters that work in both environments? I found zero documentation on filters so any help would be appreciated.
Also you might want to add documentation on how to add auth to couchdb, I had to scour the source for a few minutes to solve that mystery. This is the method that looked the most 'correct'.
The text was updated successfully, but these errors were encountered: