Last active
October 23, 2021 14:01
-
-
Save galElmalah/aa949b89c01c5dc36ad59ed97230b03c 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
const axios = require('axios') | |
const fs = require('fs') | |
const jobs = [] | |
for (let index = 0; index < 40; index++) { | |
jobs.push('https://static.parastorage.com/services/promote-seo/1.2335.0/business-manager-component.bundle.min.js') | |
} | |
console.log('running ',+jobs.length, ' jobs') | |
console.time('download and write') | |
Promise.all(jobs.map((url, i) => axios.get(url).then(({data}) => { | |
return fs.promises.writeFile(__dirname + `/temp/${i}.js`,data) | |
}))).then(() => | |
console.timeEnd('download and write') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment