Downloading N number of remote files using Node.js synchronously
问题 I'm working on a simple app using Node.js which needs to do the following when given a valid URL Retrieve the HTML of the remote page, save it locally. Spider the HTML (using cheerio) and record all JS and CSS file references. Make HTTP request for each JS/CSS file and save it to the server by file name. Zip up the html, css, and js files and stream the resulting file to the browser. I've got 1 and 2 working, and the first half of #3 but I'm running into issues with the synchronous nature of