Skip to content

Instantly share code, notes, and snippets.

@boutell
Created September 5, 2016 21:58
Show Gist options
  • Save boutell/fb4c132d242f45d5afdfaab4a5b9a9c6 to your computer and use it in GitHub Desktop.
Save boutell/fb4c132d242f45d5afdfaab4a5b9a9c6 to your computer and use it in GitHub Desktop.
var async = require('async');
function doItAll(callback) {
return async.parallel([
fnOne,
fnTwo,
fnThree
], callback);
function fnOne(callback) {
// make first request etc., invoke callback
}
function fnTwo(callback) {
// make second request etc., invoke callback
}
function fnThree(callback) {
// make third request etc., invoke callback
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment