Created
May 8, 2015 02:27
-
-
Save entertainyou/f7f97a29c2af48524974 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
var request = require('request'); | |
var fs = require('fs'); | |
var count = 2000; | |
for (let i = 0; i < count; i++) { | |
var stream = fs.createWriteStream('file' + i + '.png'); | |
request('https://www.baidu.com/img/bd_logo1.png').pipe(stream); | |
} | |
setTimeout(function () { | |
console.log('TIMEOUT'); | |
}, 10000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment