Skip to content

Instantly share code, notes, and snippets.

@mrm8488
Created December 23, 2015 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrm8488/229752b1b7ca3edd6c78 to your computer and use it in GitHub Desktop.
Save mrm8488/229752b1b7ca3edd6c78 to your computer and use it in GitHub Desktop.
var User = require('route/to/models/User.js');
// Find a user by his ID
User.findById(<id>, function(error, user) {
User.getFriends(user.id, function(error2, friends) {
User.getJobs(user.id, function(error3, jobs) {
...
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment