Forked from Spencer-Allen/gist:56e8b9a599e7b22e8eab
Last active Aug 29, 2015
This file contains 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 async = require('async') | |
var request = require('request') | |
var urls = process.argv.slice(2) | |
console.log('urls', urls) | |
async.map(urls, get, function(err, results) { | |
if (err) return console.error(err) | |
console.log('results', results) | |
}) | |
function get (url, cb) { | |
request(url, function(err, res, body) { | |
cb(err, body) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment