Friday, 15 April 2011

node.js - Get all in MongoDB collection using SocialCMS with Breeze -



node.js - Get all in MongoDB collection using SocialCMS with Breeze -

i'm using socialcms database middleware https://github.com/dai-shi/social-cms-backend breezejs support.

i'm able save changes mongodb collection fine using manager.savechanges() , manager.acceptchanges() , retrieve records in local cache using getentities()

using middleware

with breezejs support:

var scb_options = { mongodb_url: 'mongodb://localhost:27017/socialcmsdb', breeze_mongo: true, routes: [{ object_type: 'user', object_prefix: '/breeze-service/users' }, { object_type: 'post', object_prefix: '/breeze-service/posts' }, { object_prefix: '/breeze-service/savechanges' }] };

how retrieve remote records belonging particular route? example, want retrieve total posts remotely not in users cache.

do modify app.js, angular apps datacontext, both or neither?

i solved problem. it's bit hard discern social cms docs routes local first. great if want route without net access! needed create new routes outside of scb_options in order request mongodb directly.

node.js angularjs mongodb breeze middleware

No comments:

Post a Comment