Skip to content

Instantly share code, notes, and snippets.

@rmurphey
Created July 8, 2015 20:27
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 rmurphey/a6e42c60963a97e7e88b to your computer and use it in GitHub Desktop.
Save rmurphey/a6e42c60963a97e7e88b to your computer and use it in GitHub Desktop.
async.waterfall([
function1, // returns Thing1
(function () {
return function (Thing1) {
function2(Thing1, Obj1, Obj2, Obj3);
};
}()), // uses Thing1 to create Thing2 but also requires a lot of other parameters to be passed to it.
], function (err, result) {
if (err) {
console.log('barf')
}
res.json(201, { thing1 : result.thing1, thing2 : result.thing2 })
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment