Created
April 8, 2016 06:02
-
-
Save kbk0125/b1847832e3b54350c122e62c89736411 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var app = require('express')(); | |
var results; | |
function logRes(){ | |
console.log(results); | |
} | |
app.get('/storeData', minion1(req,res){ | |
readResult(logRes) | |
}); | |
function readResult(minion3){ | |
request('http://someroute.com/api', minion2(err, response, body){ | |
results=body; | |
minion3(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment