Node.js deferred promisify + mongoose
Has anyone worked with the nodejs modules 'deferred' and 'mongoose'? I'm trying to get the deferred.promisify method to work on mongoose models' functions so I can chain them easily, but running into some troubles. Specifically, I'd like to promisify the find and findById functions so I can chain finding one document referenced by another document by ObjectID. Here's what I've got: https://gist.github.com/3321827 However, this seems less than ideal since the getAppPermissions and getApplication functions seem to be little more than wrappers for the find and findById methods of the mongoose